- 
      
- 
        Save cholung/1728573b5e804c3b49f3 to your computer and use it in GitHub Desktop. 
Revisions
- 
        awidegreen revised this gist Sep 18, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -203,6 +203,8 @@ dib Delete contents in parenthesis '(' ')' block (e.g. function args) diB Delete inner '{' '}' block daB Delete a '{' '}' block das Delete a senctence diw Delete word under cursor ciw Change word under cursor ciB Change inner '{' '}' block #J Merge # number of lines together ``` 
- 
        awidegreen revised this gist May 27, 2015 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -199,7 +199,11 @@ d^ Delete up unto the beginning of the line d$ Delete until end of the line D See d$, delete until end of the line dd Delete whole line dib Delete contents in parenthesis '(' ')' block (e.g. function args) diB Delete inner '{' '}' block daB Delete a '{' '}' block das Delete a senctence ciB Change inner '{' '}' block #J Merge # number of lines together ``` @@ -324,6 +328,8 @@ C-b Change mode: mru (most recent used) | buffers | files * http://rayninfo.co.uk/vimtips.html * Use ag (silver searcher) as an indexer for Ctrl-P; and py-matcher for ctrl-p matching function: http://blog.patspam.com/2014/super-fast-ctrlp * [Command-T authors cheatsheet](https://wincent.com/wiki/Vim_cheatsheet) * https://takac.github.io/2013/01/30/vim-grammar/ ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Jan 19, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -323,7 +323,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning * http://rayninfo.co.uk/vimtips.html * Use ag (silver searcher) as an indexer for Ctrl-P; and py-matcher for ctrl-p matching function: http://blog.patspam.com/2014/super-fast-ctrlp * [Command-T authors cheatsheet](https://wincent.com/wiki/Vim_cheatsheet) ## Plugins ## * NERDTree 
- 
        awidegreen renamed this gist Jan 19, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -323,6 +323,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning * http://rayninfo.co.uk/vimtips.html * Use ag (silver searcher) as an indexer for Ctrl-P; and py-matcher for ctrl-p matching function: http://blog.patspam.com/2014/super-fast-ctrlp * [Command-T authors cheatsheet][https://wincent.com/wiki/Vim_cheatsheet] ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Aug 29, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ # General # ``` :q close :w write/saves :wa[!] write/save all windows [force] :wq write/save and close :x save and quit, same as wq @@ -322,7 +322,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [VimGenius](http://vimgenius.com/) Interactive vim lesson, with some muscle learn potential * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning * http://rayninfo.co.uk/vimtips.html * Use ag (silver searcher) as an indexer for Ctrl-P; and py-matcher for ctrl-p matching function: http://blog.patspam.com/2014/super-fast-ctrlp ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Aug 29, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -322,6 +322,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [VimGenius](http://vimgenius.com/) Interactive vim lesson, with some muscle learn potential * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning * http://rayninfo.co.uk/vimtips.html * Use ag (silver search) as a indexer for Ctrl-P; and py-matcher for ctrl-p matching function: http://blog.patspam.com/2014/super-fast-ctrlp ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Aug 12, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -321,6 +321,7 @@ C-b Change mode: mru (most recent used) | buffers | files * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know * [VimGenius](http://vimgenius.com/) Interactive vim lesson, with some muscle learn potential * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning * http://rayninfo.co.uk/vimtips.html ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Jun 26, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -320,6 +320,7 @@ C-b Change mode: mru (most recent used) | buffers | files * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know * [VimGenius](http://vimgenius.com/) Interactive vim lesson, with some muscle learn potential * [Best of VimTips](http://zzapper.co.uk/vimtips.html) zzapper 15 Years of Vi + 8+ years of Vim and still learning ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist May 26, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -126,7 +126,7 @@ B jump backward by words (no punctuation) ``` # Search, jump # consider consulting `:help [` and `:help g` ``` * search for word under cursor (forward) and highlight occurrence (see incsearch, hlsearch below) 
- 
        awidegreen revised this gist May 26, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -126,6 +126,7 @@ B jump backward by words (no punctuation) ``` # Search, jump # consider consulting `help [` and `help g` ``` * search for word under cursor (forward) and highlight occurrence (see incsearch, hlsearch below) @@ -139,6 +140,10 @@ F<c> Find char <c> from current cursor position -- backwards ; Repeat previous f<c> or F<c> in same direction '. jump back to last edited line. g; jump back to last edited position. [m jump to start of funtion body [i show first declartion/use of the word under cursor [I show all occurrences of word under cursor in current file [/ cursor to N previous start of a C comment ``` ### vimgrep and quickfix list ### 
- 
        awidegreen revised this gist Aug 21, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -301,6 +301,7 @@ C-b Change mode: mru (most recent used) | buffers | files * http://www.fprintf.net/vimCheatSheet.html * https://wiki.archlinux.org/index.php/Vim * http://www.fprintf.net/vimCheatSheet.html * [Yet Another Vim Cheat Sheet](http://rtorruellas.com/vim-cheat-sheet/) ## Articles ## * Seven habits of effective text editing: http://www.moolenaar.net/habits.html @@ -313,7 +314,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [vimregex.com](http://vimregex.com/) Infos about vims regex engine * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know * [VimGenius](http://vimgenius.com/) Interactive vim lesson, with some muscle learn potential ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Aug 21, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -314,6 +314,7 @@ C-b Change mode: mru (most recent used) | buffers | files * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know * [Yet Another Vim Cheat Sheet](http://rtorruellas.com/vim-cheat-sheet/) ## Plugins ## * NERDTree * NERDCommenter 
- 
        awidegreen revised this gist Aug 21, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -313,7 +313,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [vimregex.com](http://vimregex.com/) Infos about vims regex engine * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know * [Yet Another Vim Cheat Sheet](http://rtorruellas.com/vim-cheat-sheet/) ## Plugins ## * NERDTree * NERDCommenter 
- 
        awidegreen revised this gist Aug 21, 2013 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -168,7 +168,20 @@ Unimpaired plugin (https://github.com/tpope/vim-unimpaired) provides the followi ``` see also: http://usevim.com/2012/08/24/vim101-quickfix/ and http://vimdoc.sourceforge.net/htmldoc/quickfix.html ## Marks ## Mark a position in a buffer and jump back to it. see also http://vim.wikia.com/wiki/Using_marks ``` ma set mark a at current cursor location 'a jump to line of mark a (first non-blank character in line) `a jump to position (line and column) of mark a d'a delete from current line to line of mark a d`a delete from current cursor position to position of mark a c'a change text from current line to line of mark a y`a yank text to unnamed buffer from cursor to position of mark a :marks list all the current marks :marks aB list marks a, B ``` (text is copied from link above) # Editing # ``` 
- 
        awidegreen revised this gist Aug 16, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -182,6 +182,7 @@ d$ Delete until end of the line D See d$, delete until end of the line dd Delete whole line dib Delete contents in parenthesis block (e.g. function args) #J Merge # number of lines together ``` ``` 
- 
        awidegreen revised this gist Jul 9, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -207,7 +207,11 @@ U Convert selection (visual mode) to uppercase :g/^#/d Delete all lines that begins with # :g/^$/d Delete all lines that are empty ``` # Misc # ``` ga Show ASCII of char under cursor ``` # Key sequences # #### Replace a word in a number of occurrences with 'bar'; use word under cursor (`*` or `/foo`) #### 
- 
        awidegreen revised this gist Jul 9, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,7 +133,10 @@ B jump backward by words (no punctuation) [{ jump to start of current code block ]} jump to end of current code block gd jump to var declaration (see incsearch, hlsearch below) f<c> Find char <c> from current cursor position -- forwards F<c> Find char <c> from current cursor position -- backwards , Repeat previous f<c> or F<c> in opposite direction ; Repeat previous f<c> or F<c> in same direction '. jump back to last edited line. g; jump back to last edited position. ``` 
- 
        awidegreen revised this gist Jun 30, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -291,6 +291,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [usevim.com](http://usevim.com/) Plugin introductions and useful tipps * [vimregex.com](http://vimregex.com/) Infos about vims regex engine * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim * 100 Vim commands every programmer should know http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist May 15, 2013 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -195,6 +195,11 @@ r<c> Replace char <c> :%s/xxx/yyy/g Replace xxx with yyy global in the whole file ``` ``` u Convert selection (visual mode) to lowercase U Convert selection (visual mode) to uppercase ``` ``` :g/^#/d Delete all lines that begins with # :g/^$/d Delete all lines that are empty 
- 
        awidegreen revised this gist May 13, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,6 +134,8 @@ B jump backward by words (no punctuation) ]} jump to end of current code block gd jump to var declaration (see incsearch, hlsearch below) f<c> Find char <c> from current cursor position '. jump back to last edited line. g; jump back to last edited position. ``` ### vimgrep and quickfix list ### @@ -176,6 +178,7 @@ d^ Delete up unto the beginning of the line d$ Delete until end of the line D See d$, delete until end of the line dd Delete whole line dib Delete contents in parenthesis block (e.g. function args) ``` ``` 
- 
        awidegreen revised this gist May 5, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -282,6 +282,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [vimcasts.org](http://vimcasts.org/) Video-casts on vim * [usevim.com](http://usevim.com/) Plugin introductions and useful tipps * [vimregex.com](http://vimregex.com/) Infos about vims regex engine * Productive vim shortcuts http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Apr 30, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -100,8 +100,8 @@ M Jump to MIDDLE of screen L Jump to BOTTOM of screen C-b Move back one full screen (page up) C-f Move forward one full screen (page down) C-d Move forward 1/2 screen; half page down C-u Move back (up) 1/2 screen; half page up ``` ``` 
- 
        awidegreen revised this gist Apr 26, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -276,12 +276,12 @@ C-b Change mode: mru (most recent used) | buffers | files ## Articles ## * Seven habits of effective text editing: http://www.moolenaar.net/habits.html * Vim After 11 Years: http://statico.github.com/vim.html * Coming Home to Vim: http://stevelosh.com/blog/2010/09/coming-home-to-vim ## tipps and tricks ## * [vimcasts.org](http://vimcasts.org/) Video-casts on vim * [usevim.com](http://usevim.com/) Plugin introductions and useful tipps * [vimregex.com](http://vimregex.com/) Infos about vims regex engine ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Apr 26, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -281,6 +281,7 @@ C-b Change mode: mru (most recent used) | buffers | files * [vimcasts.org](http://vimcasts.org/) Video-casts on vim * [usevim.com](http://usevim.com/) Plugin introductions and useful tipps * [vimregex.com](http://vimregex.com/) Infos about vims regex engine * http://stevelosh.com/blog/2010/09/coming-home-to-vim ## Plugins ## * NERDTree 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 20 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -277,7 +277,26 @@ C-b Change mode: mru (most recent used) | buffers | files * Seven habits of effective text editing: http://www.moolenaar.net/habits.html * Vim After 11 Years: http://statico.github.com/vim.html ## tipps and tricks ## * [vimcasts.org](http://vimcasts.org/) Video-casts on vim * [usevim.com](http://usevim.com/) Plugin introductions and useful tipps * [vimregex.com](http://vimregex.com/) Infos about vims regex engine ## Plugins ## * NERDTree * NERDCommenter * Ctrl-P * easytags * unimpard * supertab * tagbar * omnicomplete (C++) ## Themes ## * zenburn * tango ## Color column ## * activate colorcolumn: http://stackoverflow.com/questions/1919028/how-to-show-vertical-line-to-wrap-the-line-in-vim * set color: http://choorucode.wordpress.com/2011/07/29/vim-set-color-of-colorcolumn/ 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 29 additions and 28 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -65,34 +65,6 @@ q[a-z] Start recording, everything will be recorded including movement actions @[a-z] Execute the recorded actions. ``` ### Spell checking ### See vimcast #19 as an introduction: http://vimcasts.org/episodes/spell-checking/ @@ -164,6 +136,35 @@ gd jump to var declaration (see incsearch, hlsearch below) f<c> Find char <c> from current cursor position ``` ### vimgrep and quickfix list ### built-in grep, vimgrep uses vim's quickfix list. see vimcasts#44 for introduction: http://vimcasts.org/episodes/search-multiple-files-with-vimgrep/ ``` :vimgrep /<regex>/g % Search for <regex> with multiple occasions per line (g) in current file (%) :vimgrep /<C-r>// % On the command line, <C-r>/ (that is: CTRL-R followed by /) will insert the last search pattern. :vimgrep /<a>/g <filelist> Search in the given files (<filelist>) :vimgrep /<a>/g *.cc Search in all *.cc files current directory :vimgrep /<a>/g **/*.cc Search in all *.cc files in every sub-directory (recursively) :vimgrep /<a>/g `find . -type f` Search in all files that are returns by the backtick command. :vim short for :vimgrep :cnext Jump to next record/match in quickfix list :cprev Jump to previous record/match in quickfix list ``` Unimpaired plugin (https://github.com/tpope/vim-unimpaired) provides the following mappings: ``` [q see :cprev ]q see :cnext [Q see :cfirst ]Q see :clast ``` see also: http://usevim.com/2012/08/24/vim101-quickfix/ and http://vimdoc.sourceforge.net/htmldoc/quickfix.html # Editing # ``` x Delete char UNDER cursor 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -72,11 +72,11 @@ built-in grep, vimgrep uses vim's quickfix list. see vimcasts#44 for introductio in current file (%) :vimgrep /<C-r>// % On the command line, <C-r>/ (that is: CTRL-R followed by /) will insert the last search pattern. :vimgrep /<a>/g <filelist> Search in the given files (<filelist>) :vimgrep /<a>/g *.cc Search in all *.cc files current directory :vimgrep /<a>/g **/*.cc Search in all *.cc files in every sub-directory (recursively) :vimgrep /<a>/g `find . -type f` Search in all files that are returns by the backtick command. :vim short for :vimgrep 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 13 additions and 6 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,10 +68,17 @@ q[a-z] Start recording, everything will be recorded including movement actions ### vimgrep and quickfix list ### built-in grep, vimgrep uses vim's quickfix list. see vimcasts#44 for introduction: http://vimcasts.org/episodes/search-multiple-files-with-vimgrep/ ``` :vimgrep /<regex>/g % Search for <regex> with multiple occasions per line (g) in current file (%) :vimgrep /<C-r>// % On the command line, <C-r>/ (that is: CTRL-R followed by /) will insert the last search pattern. :vimgrep /<a>/g <filelist> Search in the given files (<filelist>) [FILEPATH] :vimgrep /<a>/g *.cc Search in all *.cc files current directory. [WILDCARD] :vimgrep /<a>/g **/*.cc Search in all *.cc files in every sub-directory (recursively) [WILDCARD] :vimgrep /<a>/g `find . -type f` Search in all files that are returns by the backtick command. [BACKTICK] :vim short for :vimgrep :cnext Jump to next record/match in quickfix list :cprev Jump to previous record/match in quickfix list @@ -99,7 +106,7 @@ nnoremap <silent> <leader>s :set spell!<cr> <leader>s Toggle Spelling ]s Next spelling mistake [s Previous spelling mistake z= Give Suggestions (prepent 1, use first suggestions automatically) zg Add misspelled to spellfile zug Remove word from spellfile ``` @@ -178,7 +185,7 @@ r<c> Replace char <c> ``` ``` :s/xxx/yyy/ Replace xxx with yyy at the first occurrence :s/xxx/yyy/g Replace xxx with yyy first occurrence, global (whole sentence) :s/xxx/yyy/gc Replace xxx with yyy global with confirm :%s/xxx/yyy/g Replace xxx with yyy global in the whole file 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,8 +68,10 @@ q[a-z] Start recording, everything will be recorded including movement actions ### vimgrep and quickfix list ### built-in grep, vimgrep uses vim's quickfix list. see vimcasts#44 for introduction: http://vimcasts.org/episodes/search-multiple-files-with-vimgrep/ ``` :vimgrep /<regex>/g % Search for <regex> with multiple occasions per line (g) in current file (%) :vimgrep /<C-r>// % On the command line, <C-r>/ (that is: CTRL-R followed by /) will insert the last search pattern. :cnext Jump to next record/match in quickfix list :cprev Jump to previous record/match in quickfix list 
- 
        awidegreen revised this gist Apr 25, 2013 . 1 changed file with 15 additions and 12 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -65,30 +65,33 @@ q[a-z] Start recording, everything will be recorded including movement actions @[a-z] Execute the recorded actions. ``` ### vimgrep and quickfix list ### built-in grep, vimgrep uses vim's quickfix list. see vimcasts#44 for introduction: http://vimcasts.org/episodes/search-multiple-files-with-vimgrep/ ``` :vimgrep /<regex>/g % Search for <regex> with multiple occasions per line (g) in current file (%) :vimgrep /<C-r>// % On the command line, <C-r>/ (that is: CTRL-R followed by /) will insert the last search pattern. :cnext Jump to next record/match in quickfix list :cprev Jump to previous record/match in quickfix list ``` Unimpaired plugin (https://github.com/tpope/vim-unimpaired) provides the following mappings: ``` [q see :cprev ]q see :cnext [Q see :cfirst ]Q see :clast ``` see also: http://usevim.com/2012/08/24/vim101-quickfix/ and http://vimdoc.sourceforge.net/htmldoc/quickfix.html ### Spell checking ### See vimcast #19 as an introduction: http://vimcasts.org/episodes/spell-checking/ Assuming that you have the following in .vimrc: ``` nnoremap <silent> <leader>s :set spell!<cr> ``` ``` <leader>s Toggle Spelling 
NewerOlder