From bff94dc74a108625c059261e987a68fa1b20ede4 Mon Sep 17 00:00:00 2001 From: Maksim Pecherskiy Date: Mon, 5 May 2014 08:45:16 -0700 Subject: [PATCH] Update reamde. --- README.md | 56 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 77b710d0..5a6f068c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # The Ultimate vimrc +## Important -- set iterm profile -> terminal -> report terminal type: xterm-256 + Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. There are two versions: @@ -100,13 +102,13 @@ After you have installed the setup you can create **~/.vim_runtime/my_configs.vi ~/.vim_runtime (master)> cat my_configs.vim map ct :cd ~/Desktop/Todoist/todoist - map cw :cd ~/Desktop/Wedoist/wedoist + map cw :cd ~/Desktop/Wedoist/wedoist You can also install your own plugins, for instance, via pathogen we can install [vim-rails](https://github.com/tpope/vim-rails): cd ~/.vim_runtime git clone git://github.com/tpope/vim-rails.git sources_non_forked/vim-rails - + Now you have vim-rails installed ;-) @@ -115,7 +117,7 @@ Now you have vim-rails installed ;-) ### Plugin related mappings Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers: - + map o :BufExplorer Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files: @@ -123,7 +125,7 @@ Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open map f :MRU Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin: - + let g:ctrlp_map = '' Open [PeepOpen](https://peepcode.com/products/peepopen) plugin: @@ -133,7 +135,7 @@ Open [PeepOpen](https://peepcode.com/products/peepopen) plugin: Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: map nn :NERDTreeToggle - map nb :NERDTreeFromBookmark + map nb :NERDTreeFromBookmark map nf :NERDTreeFind ### Normal mode mappings @@ -146,65 +148,65 @@ Treat long lines as break lines (useful when moving around in them): map j gj map k gk - + Map `` to `/` (search) and `+` to `?` (backwards search): - + map / map ? map :noh Disable highlight when `` is pressed: - + map :noh Smart way to move between windows: - + map j map k map h map l Closing of current buffer(s): - + " Close current buffer map bd :Bclose - + " Close all buffers map ba :1,1000 bd! - + Useful mappings for managing tabs: - + map tn :tabnew map to :tabonly map tc :tabclose - map tm :tabmove - + map tm :tabmove + " Opens a new tab with the current buffer's path " Super useful when editing files in the same directory map te :tabedit =expand("%:p:h")/ - + Switch CWD to the directory of the open buffer: - + map cd :cd %:p:h:pwd - + Open vimgrep and put the cursor in the right position: - + map g :vimgrep // **/*. Vimgreps in the current file: - + map :vimgrep // % Remove the Windows ^M - when the encodings gets messed up: - + noremap m mmHmt:%s///ge'tzt'm - + Quickly open a buffer for scripbble: - + map q :e ~/buffer Toggle paste mode on and off: - + map pp :setlocal paste! @@ -248,7 +250,7 @@ Surround the visual selection in parenthesis/brackets/etc.: vnoremap $$ `>a"` vnoremap $q `>a'` vnoremap $e `>a"` - + ### Command line mappings @@ -267,7 +269,7 @@ Bash like keys for the command line: Write the file as sudo (only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write): - :W + :W ### Spell checking @@ -282,7 +284,7 @@ Shortcuts using `` instead of special chars map sa zg map s? z= -### Cope +### Cope Do :help cope if you are unsure what cope is. It's super useful! When you search with vimgrep, display your results in cope by doing: