Last active
November 3, 2025 20:23
-
Star
(273)
You must be signed in to star a gist -
Fork
(88)
You must be signed in to fork a gist
-
-
Save tuxfight3r/0dca25825d9f2608714b to your computer and use it in GitHub Desktop.
Revisions
-
tuxfight3r revised this gist
Dec 11, 2018 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -163,6 +163,11 @@ CTRL+X - Decrement the number at cursor . - Repeat last change or delete ; - Repeat last f, t, F, or T command , - Repeat last f, t, F, or T command in opposite direction vim +10 <file_name> - opens the file at line 10 vim +/bash cronjob-lab.yml - opens the file cronjob-lab.yml on the first occurence of bash vim scp://balasundaramm@mgmt-bst:22/~/automation/test-file.txt - Edit a remote file via scp ``` ### HISTORY/COMMAND BUFFER @@ -191,6 +196,9 @@ CTRL+p - Press after typing part of a word. It scrolls up the list of :vertical ball - opens up all available buffero in vertical split window :q - close the buffer window :help buffers - help for buffers :r <file_path> - reads a file from the path to the buffer :r !<command> - reads the output of the command into buffer :.! cat <file_path> - reads the output of the command (eg: cat) into buffer or !! in ex-mode ``` ### TAB VIEWS @@ -254,6 +262,11 @@ CTRL+w v - Split current window vertically CTRL+w c - Close current window CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) # EX Mode :Vex - Open Vertical Split in ex mode with file browser :Sex - Open Vertical Split in ex mode with file browser ``` ### MOVING WINDOWS -
tuxfight3r revised this gist
Apr 20, 2018 . 1 changed file with 24 additions and 23 deletions.There are no files selected for viewing
This 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 @@ -1,6 +1,6 @@ # VIM KEYBOARD SHORTCUTS ### MOVEMENT ``` h - Move left j - Move down @@ -42,7 +42,7 @@ n - Repeat the last / or ? command N - Repeat the last / or ? command in the opposite direction ``` ### NORMAL MODE -> INSERT MODE ``` i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor @@ -57,7 +57,7 @@ cc - Delete current line and enter insert mode (unlike dd which leaves y C - Delete (change) from cursor to end of line, and enter insert mode ``` ### DELETION ``` x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode @@ -68,7 +68,7 @@ dd - Delete entire current line D - Delete until end of line ``` ### YANK & PUT ``` y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line @@ -80,7 +80,7 @@ J - Join current line with the next line. Use gJ to exclude join-positi xp - Transpose two letters (delete and paste, technically) ``` ### VISUAL MODE ``` v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines @@ -96,7 +96,7 @@ vac - Highlight all text including the pair marked with c (like va<, va' vic - Highlight all text inside the pair marked with c ``` ### MARKING ``` ma - Set a marker a at cursor position to come back to later. a can be any character you choose mb - Set a marker b at current position @@ -115,7 +115,7 @@ y`a - Yank text to unnamed buffer from cursor to position of mark a ``` ### VIM FOLDING ``` zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . @@ -144,7 +144,7 @@ zR - decreases the foldlevel to zero -- all folds will be open. :set foldmethod=indent - automatically fold programms per its indentation ``` ### MISCELLANEOUS ``` u - Undo U - Undo all changes on current line @@ -154,7 +154,7 @@ CTRL+R - Redo g~ - switch case under cursor g~$ - Toggle case of all characters to end of line. g~~ - Toggle case of the current line (same as V~). gUU - switch the current line to upper case guu - switch the current line to lower case CTRL+A - Increment the number at cursor @@ -165,7 +165,7 @@ CTRL+X - Decrement the number at cursor , - Repeat last f, t, F, or T command in opposite direction ``` ### HISTORY/COMMAND BUFFER ``` q: - list history in command buffer q/ - search history in command buffer @@ -178,7 +178,7 @@ CTRL+n - Press after typing part of a word. It scrolls down the list CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ``` ### BUFFERS ``` :ls (or :buffers) - list / show available buffers :e filename - Edit a file in a new buffer @@ -193,7 +193,7 @@ CTRL+p - Press after typing part of a word. It scrolls up the list of :help buffers - help for buffers ``` ### TAB VIEWS ``` :tabe filename - opens the file in newtab :tabe new - open an empty tab @@ -207,22 +207,22 @@ CTRL+p - Press after typing part of a word. It scrolls up the list of vim -p *.txt - open all txt files in tabs ``` ### TAB NAVIGATION ``` gt - go to next tab gT - go to previous tab {i}gt - go to tab in position i ``` ### TAB SHORTCUTS ``` CTRL+W T - Break out current window into a new tabview CTRL+W o - Close every window in the current tabview but the current one CTRL+W n - create a new window in the current tabview CTRL+W c - Close current window in the current tabview ``` ### WINDOW MANAGEMENT ``` #split screen horizontal :split filename @@ -244,6 +244,7 @@ vim -O file1 file2 :vertical resize 20 #diff :windo diffthis - diff between 2 vsplit windows :diffs, diffsplit {filename} - diffs the current window with the file given :diffoff - turns off diff selection @@ -255,7 +256,7 @@ CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) ``` ### MOVING WINDOWS ``` CTRL+W r - Swap bottom/top if split horizontally CTRL+W R - Swap top/bottom if split horizontally @@ -269,7 +270,7 @@ CTRL+w K - Move current window the far top and full width of the screen CTRL+w L - Move current window the far right and full height of the screen ``` ### NAVIGATE BETWEEN WINDOWS ``` CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window @@ -278,7 +279,7 @@ CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window ``` ### RESIZING WINDOWS ``` #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file. @@ -292,28 +293,28 @@ CTRL+w - - Incrementally decrease the window's height. Takes a parameter CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 + ``` ### COMMENT LINES (TCOMMENT PLUGIN) ``` CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ### MODELINE MAGIC ``` :set modeline - Enable modeline magic or add this option to your .vimrc \ml - write the modeline based on your settings to the file ``` ### NERDTree Plugin ``` CTRL-n - Toggle m - opens the menu ? - help i - horizontal split s - vertical split CTRL-w + <-|-> - (left or right) to navigate ``` ### PERMISSION OVERRIDE ### ``` -
tuxfight3r revised this gist
Aug 18, 2016 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This 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 @@ -23,7 +23,10 @@ ge - Move backwards to next word, with cursor on last character (use gE CTRL+u - Move up by half a page CTRL+d - Move down by half a page CTRL+b - Move up by a page CTRL+f - Move down by a page H - Move cursor to header (top) line of current visible window M - Move cursor to middle line of current visible window L - Move cursor to last line of current visible window -
tuxfight3r revised this gist
Jul 28, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -312,7 +312,12 @@ i - horizontal split s - vertical split CTRL-w + <-|-> - (left or right) to navigate ``` ### PERMISSION OVERRIDE ### ``` :w !sudo tee % - Allows to override the permission of the written file :w !sudo sh -c "cat > %" - " " ``` More details: https://www.cs.oberlin.edu/~kuperman/help/vim/markers.html -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This 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,11 @@ zr - decreases the foldlevel by one. zR - decreases the foldlevel to zero -- all folds will be open. [z - move to start of open fold. ]z - move to end of open fold. :set foldmethod=manual - default method v{select block}zf to fold :set foldmethod=marker - use marker fold method {{{ :set foldemethod=marker/*,*/ - user custom marker fold method :set foldmethod=indent - automatically fold programms per its indentation ``` ###MISCELLANEOUS### -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 29 additions and 29 deletions.There are no files selected for viewing
This 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 @@ -39,23 +39,19 @@ n - Repeat the last / or ? command N - Repeat the last / or ? command in the opposite direction ``` ###NORMAL MODE -> INSERT MODE### ``` i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor I - Enter insert mode at first character of current line A - Enter insert mode at last character of current line o - Insert line below current line and enter insert mode O - Insert line above current line and enter insert mode cm - Delete (change) the character or word (w) in motion m, then enter insert mode cc - Delete current line and enter insert mode (unlike dd which leaves you in normal mode) C - Delete (change) from cursor to end of line, and enter insert mode ``` ###DELETION### @@ -81,21 +77,6 @@ J - Join current line with the next line. Use gJ to exclude join-positi xp - Transpose two letters (delete and paste, technically) ``` ###VISUAL MODE### ``` v - Enter visual mode and highlight characters @@ -112,6 +93,25 @@ vac - Highlight all text including the pair marked with c (like va<, va' vic - Highlight all text inside the pair marked with c ``` ###MARKING### ``` ma - Set a marker a at cursor position to come back to later. a can be any character you choose mb - Set a marker b at current position `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma 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 'a,'bs/test/foo/g - Search and replace test with foo between markers a and b ``` ###VIM FOLDING### ``` zf#j - creates a fold from the cursor down # lines. -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This 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 @@ -46,15 +46,15 @@ mb - Set a marker b at current position `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma 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 'a,'bs/test/foo/g - Search and replace test with foo between markers a and b ``` -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This 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,12 @@ CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ### MODELINE MAGIC ### ``` :set modeline - Enable modeline magic or add this option to your .vimrc \ml - write the modeline based on your settings to the file ``` ###NERDTree Plugin### ``` CTRL-n - Toggle -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -235,6 +235,11 @@ vim -O file1 file2 #vertical resize :vertical resize 20 #diff :diffs, diffsplit {filename} - diffs the current window with the file given :diffoff - turns off diff selection CTRL+w s - Split current window horizontally CTRL+w v - Split current window vertically CTRL+w c - Close current window -
tuxfight3r revised this gist
Apr 17, 2016 . 1 changed file with 23 additions and 5 deletions.There are no files selected for viewing
This 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 @@ -29,18 +29,33 @@ L - Move cursor to last line of current visible window fc - Move cursor to next occurrence of character c on the current line. Use Fc to move backwards tc - Move cursor till next character c on the current line. Use Tc to move backwards % - Move cursor to next brace, bracket or comment paired to the current cursor location * - Search forward for word under cursor # - Search backwards for word under cursor /word - Search forward for word. Accepts regular expressions to search ?word - Search backwards for word. Accepts regular expressions to search n - Repeat the last / or ? command N - Repeat the last / or ? command in the opposite direction ``` ###MARKING### ``` ma - Set a marker a at cursor position to come back to later. a can be any character you choose mb - Set a marker b at current position `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma 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 'a,'bs/test/foo/g - search and replace test with foo between markers a and b ``` ###DELETION### @@ -97,10 +112,13 @@ vac - Highlight all text including the pair marked with c (like va<, va' vic - Highlight all text inside the pair marked with c ``` ###VIM FOLDING### ``` zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . v{move}zf - creates a visual select fold zf'a - creates a fold from cursor to mark a zo - opens a fold at the cursor. zO - opens all folds at the cursor. za - Toggles a fold at the cursor. -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 45 additions and 45 deletions.There are no files selected for viewing
This 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 @@ -152,11 +152,48 @@ CTRL+n - Press after typing part of a word. It scrolls down the list CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ``` ###BUFFERS### ``` :ls (or :buffers) - list / show available buffers :e filename - Edit a file in a new buffer :bnext (or :bn) - go to next buffer :bprev (of :bp) - go to previous buffer :bdelete (or :bd) - unload a buffer (close a file) :bwipeout (or :bw) - unload a buffer and deletes it :b [N] - The number of the buffer you are interested to open :ball - opens up all available buffers in horizontal split window :vertical ball - opens up all available buffero in vertical split window :q - close the buffer window :help buffers - help for buffers ``` ###TAB VIEWS### ``` :tabe filename - opens the file in newtab :tabe new - open an empty tab :tabs - list opened tabs :tabc - close the active tab :tabn and tabp - Go to next tab or previous tab :tabfirst - Go to the first available tab :tablast - Go to the last available tab :help tabpage - help for tabs vim -p *.txt - open all txt files in tabs ``` ###TAB NAVIGATION### ``` gt - go to next tab gT - go to previous tab {i}gt - go to tab in position i ``` ###TAB SHORTCUTS### ``` CTRL+W T - Break out current window into a new tabview CTRL+W o - Close every window in the current tabview but the current one CTRL+W n - create a new window in the current tabview CTRL+W c - Close current window in the current tabview ``` ###WINDOW MANAGEMENT### @@ -224,48 +261,11 @@ CTRL+w - - Incrementally decrease the window's height. Takes a parameter CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 + ``` ###COMMENT LINES (TCOMMENT PLUGIN)### ``` CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ###NERDTree Plugin### -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -246,6 +246,8 @@ CTRL+w + - Incrementally increase the window's height. Takes a parameter :tabs - list opened tabs :tabc - close the active tab :tabn and tabp - Go to next tab or previous tab :tabfirst - Go to the first available tab :tablast - Go to the last available tab :help tabpage - help for tabs vim -p *.txt - open all txt files in tabs -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -131,6 +131,9 @@ g~~ - Toggle case of the current line (same as V~). gUU - switch the current line to upper case guu - switch the current line to lower case CTRL+A - Increment the number at cursor CTRL+X - Decrement the number at cursor . - Repeat last change or delete ; - Repeat last f, t, F, or T command , - Repeat last f, t, F, or T command in opposite direction -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 18 additions and 18 deletions.There are no files selected for viewing
This 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 @@ -1,6 +1,6 @@ # VIM KEYBOARD SHORTCUTS ###MOVEMENT### ``` h - Move left j - Move down @@ -43,7 +43,7 @@ ma - Set a marker at cursor position to come back to later. a can be any % - Move cursor to next brace, bracket or comment paired to the current cursor location ``` ###DELETION### ``` x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode @@ -54,7 +54,7 @@ dd - Delete entire current line D - Delete until end of line ``` ###YANK & PUT### ``` y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line @@ -66,7 +66,7 @@ J - Join current line with the next line. Use gJ to exclude join-positi xp - Transpose two letters (delete and paste, technically) ``` ###NORMAL MODE -> INSERT MODE### ``` i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor @@ -81,7 +81,7 @@ cc - Delete current line and enter insert mode (unlike dd which leaves y C - Delete (change) from cursor to end of line, and enter insert mode ``` ###VISUAL MODE### ``` v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines @@ -97,7 +97,7 @@ vac - Highlight all text including the pair marked with c (like va<, va' vic - Highlight all text inside the pair marked with c ``` ###VIM FOLD COMMANDS### ``` zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . @@ -118,7 +118,7 @@ zR - decreases the foldlevel to zero -- all folds will be open. ]z - move to end of open fold. ``` ###MISCELLANEOUS### ``` u - Undo U - Undo all changes on current line @@ -136,7 +136,7 @@ guu - switch the current line to lower case , - Repeat last f, t, F, or T command in opposite direction ``` ###HISTORY/COMMAND BUFFER### ``` q: - list history in command buffer q/ - search history in command buffer @@ -149,14 +149,14 @@ CTRL+n - Press after typing part of a word. It scrolls down the list CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ``` ###COMMENT LINES (TCOMMENT PLUGIN)### ``` CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ###WINDOW MANAGEMENT### ``` #split screen horizontal :split filename @@ -184,7 +184,7 @@ CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) ``` ###MOVING WINDOWS### ``` CTRL+W r - Swap bottom/top if split horizontally CTRL+W R - Swap top/bottom if split horizontally @@ -198,7 +198,7 @@ CTRL+w K - Move current window the far top and full width of the screen CTRL+w L - Move current window the far right and full height of the screen ``` ###NAVIGATE BETWEEN WINDOWS### ``` CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window @@ -207,7 +207,7 @@ CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window ``` ###RESIZING WINDOWS### ``` #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file. @@ -221,7 +221,7 @@ CTRL+w - - Incrementally decrease the window's height. Takes a parameter CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 + ``` ###BUFFERS### ``` :ls (or :buffers) - list / show available buffers :e filename - Edit a file in a new buffer @@ -236,7 +236,7 @@ CTRL+w + - Incrementally increase the window's height. Takes a parameter :help buffers - help for buffers ``` ###TAB VIEWS### ``` :tabe filename - opens the file in newtab :tabe new - open an empty tab @@ -248,22 +248,22 @@ CTRL+w + - Incrementally increase the window's height. Takes a parameter vim -p *.txt - open all txt files in tabs ``` ###TAB NAVIGATION### ``` gt - go to next tab gT - go to previous tab {i}gt - go to tab in position i ``` ###TAB SHORTCUTS### ``` CTRL+W T - Break out current window into a new tabview CTRL+W o - Close every window in the current tabview but the current one CTRL+W n - create a new window in the current tabview CTRL+W c - Close current window in the current tabview ``` ###NERDTree Plugin### ``` CTRL-n - Toggle -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 14 additions and 12 deletions.There are no files selected for viewing
This 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 @@ -43,7 +43,7 @@ ma - Set a marker at cursor position to come back to later. a can be any % - Move cursor to next brace, bracket or comment paired to the current cursor location ``` ##DELETION## ``` x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode @@ -54,7 +54,7 @@ dd - Delete entire current line D - Delete until end of line ``` ##YANK & PUT## ``` y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line @@ -66,7 +66,7 @@ J - Join current line with the next line. Use gJ to exclude join-positi xp - Transpose two letters (delete and paste, technically) ``` ##NORMAL MODE -> INSERT MODE## ``` i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor @@ -81,7 +81,7 @@ cc - Delete current line and enter insert mode (unlike dd which leaves y C - Delete (change) from cursor to end of line, and enter insert mode ``` ##VISUAL MODE## ``` v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines @@ -97,7 +97,7 @@ vac - Highlight all text including the pair marked with c (like va<, va' vic - Highlight all text inside the pair marked with c ``` ##VIM FOLD COMMANDS## ``` zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . @@ -118,7 +118,7 @@ zR - decreases the foldlevel to zero -- all folds will be open. ]z - move to end of open fold. ``` ##MISCELLANEOUS## ``` u - Undo U - Undo all changes on current line @@ -136,7 +136,7 @@ guu - switch the current line to lower case , - Repeat last f, t, F, or T command in opposite direction ``` ##HISTORY/COMMAND BUFFER## ``` q: - list history in command buffer q/ - search history in command buffer @@ -149,14 +149,14 @@ CTRL+n - Press after typing part of a word. It scrolls down the list CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ``` ##COMMENT LINES (TCOMMENT PLUGIN)## ``` CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ##WINDOW MANAGEMENT## ``` #split screen horizontal :split filename @@ -184,7 +184,7 @@ CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) ``` ##MOVING WINDOWS## ``` CTRL+W r - Swap bottom/top if split horizontally CTRL+W R - Swap top/bottom if split horizontally @@ -198,7 +198,7 @@ CTRL+w K - Move current window the far top and full width of the screen CTRL+w L - Move current window the far right and full height of the screen ``` ##NAVIGATE BETWEEN WINDOWS## ``` CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window @@ -207,7 +207,7 @@ CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window ``` ##RESIZING WINDOWS## ``` #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file. @@ -244,6 +244,8 @@ CTRL+w + - Incrementally increase the window's height. Takes a parameter :tabc - close the active tab :tabn and tabp - Go to next tab or previous tab :help tabpage - help for tabs vim -p *.txt - open all txt files in tabs ``` ## TAB NAVIGATION ## -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 36 additions and 18 deletions.There are no files selected for viewing
This 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 @@ -1,7 +1,7 @@ # VIM KEYBOARD SHORTCUTS ##MOVEMENT## ``` h - Move left j - Move down k - Move up @@ -41,19 +41,21 @@ ma - Set a marker at cursor position to come back to later. a can be any `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma % - Move cursor to next brace, bracket or comment paired to the current cursor location ``` ## DELETION ## ``` x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode s - Delete character under cursor, then switch to insert mode dm - Delete in direction of movement m. For m, you can also use w, b, or any other variation dd - Delete entire current line D - Delete until end of line ``` ### YANK & PUT ``` y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line yw - Yank a word from the cursor @@ -62,9 +64,10 @@ y$ - Yank till the end of the line P - Put yanked text above current line J - Join current line with the next line. Use gJ to exclude join-position space xp - Transpose two letters (delete and paste, technically) ``` ## NORMAL MODE -> INSERT MODE ## ``` i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor I - Enter insert mode at first character of current line @@ -76,9 +79,10 @@ O - Insert line above current line and enter insert mode cm - Delete (change) the character or word (w) in motion m, then enter insert mode cc - Delete current line and enter insert mode (unlike dd which leaves you in normal mode) C - Delete (change) from cursor to end of line, and enter insert mode ``` ## VISUAL MODE ## ``` v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines CTRL+v - Enter visual block mode and highlight exactly where the cursor moves @@ -87,14 +91,14 @@ o - Switch cursor from first & last character of highlighted block whil << - Shift lines to left >> - Shift lines to right vat - Highlight all text up to and including the parent element vit - Highlight all text up to the parent element, excluding the element vac - Highlight all text including the pair marked with c (like va<, va' or va") vic - Highlight all text inside the pair marked with c ``` ## VIM FOLD COMMANDS ## ``` zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . zo - opens a fold at the cursor. @@ -112,9 +116,10 @@ zr - decreases the foldlevel by one. zR - decreases the foldlevel to zero -- all folds will be open. [z - move to start of open fold. ]z - move to end of open fold. ``` ## MISCELLANEOUS ## ``` u - Undo U - Undo all changes on current line CTRL+R - Redo @@ -129,9 +134,10 @@ guu - switch the current line to lower case . - Repeat last change or delete ; - Repeat last f, t, F, or T command , - Repeat last f, t, F, or T command in opposite direction ``` ## HISTORY/COMMAND BUFFER ## ``` q: - list history in command buffer q/ - search history in command buffer CTRL+c CTRL+c - close the command buffer @@ -141,15 +147,17 @@ CTRL+c CTRL+c - close the command buffer gg=G - Format HTML. Make sure FileType is set to html with :setf html CTRL+n - Press after typing part of a word. It scrolls down the list of all previously used words CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ``` ## COMMENT LINES (TCOMMENT PLUGIN) ## ``` CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ``` ## WINDOW MANAGEMENT ## ``` #split screen horizontal :split filename vim -o file1 file2 @@ -174,9 +182,10 @@ CTRL+w v - Split current window vertically CTRL+w c - Close current window CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) ``` ##MOVING WINDOWS ## ``` CTRL+W r - Swap bottom/top if split horizontally CTRL+W R - Swap top/bottom if split horizontally @@ -187,18 +196,19 @@ CTRL+w H - Move current window the far left and use the full height of t CTRL+w J - Move current window the far bottom and use the full width of the screen CTRL+w K - Move current window the far top and full width of the screen CTRL+w L - Move current window the far right and full height of the screen ``` ## NAVIGATE BETWEEN WINDOWS ## ``` CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window CTRL+w DOWN - Move to the bottom window from current window CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window ``` ## RESIZING WINDOWS ## ``` #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file. CTRL+w _ - Max out the height of the current split @@ -209,8 +219,10 @@ CTRL+w > - Incrementally increase the window to the right. Takes a param CTRL+w < - Incrementally increase the window to the left. Takes a parameter, e.g. CTRL-w 20 < CTRL+w - - Incrementally decrease the window's height. Takes a parameter, e.g. CTRL-w 10 - CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 + ``` ##BUFFERS## ``` :ls (or :buffers) - list / show available buffers :e filename - Edit a file in a new buffer :bnext (or :bn) - go to next buffer @@ -222,37 +234,43 @@ CTRL+w + - Incrementally increase the window's height. Takes a parameter :vertical ball - opens up all available buffero in vertical split window :q - close the buffer window :help buffers - help for buffers ``` ##TAB VIEWS## ``` :tabe filename - opens the file in newtab :tabe new - open an empty tab :tabs - list opened tabs :tabc - close the active tab :tabn and tabp - Go to next tab or previous tab :help tabpage - help for tabs ``` ## TAB NAVIGATION ## ``` gt - go to next tab gT - go to previous tab {i}gt - go to tab in position i ``` ## TAB SHORTCUTS ## ``` CTRL+W T - Break out current window into a new tabview CTRL+W o - Close every window in the current tabview but the current one CTRL+W n - create a new window in the current tabview CTRL+W c - Close current window in the current tabview ``` ## NERDTree Plugin ## ``` CTRL-n - Toggle m - opens the menu ? - help i - horizontal split s - vertical split CTRL-w + <-|-> - (left or right) to navigate ``` More details: https://www.cs.oberlin.edu/~kuperman/help/vim/markers.html -
tuxfight3r renamed this gist
Apr 9, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 156 additions and 134 deletions.There are no files selected for viewing
This 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 @@ -2,93 +2,96 @@ ##MOVEMENT## h - Move left j - Move down k - Move up l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) b - Move backward to next word, with cursor on first character (use B to jump by whitespace only) e - Move forward to next word, with cursor on last character (use E to jump by whitespace only) ge - Move backwards to next word, with cursor on last character (use gE to jump by whitespace only) ( - Move to beginning of previous sentence. Use ) to go to next sentence { - Move to beginning of previous paragraph. Use } to go to next paragraph + - Move forward to the first character on the next line - - Move backwards to the first character on the previous line CTRL+u - Move up by half a page CTRL+d - Move down by half a page H - Move cursor to header (top) line of current visible windo M - Move cursor to middle line of current visible window L - Move cursor to last line of current visible window fc - Move cursor to next occurrence of character c on the current line. Use Fc to move backwards tc - Move cursor till next character c on the current line. Use Tc to move backwards * - Search forward for word under cursor # - Search backwards for word under cursor /word - Search forward for word. Accepts regular expressions to search ?word - Search backwards for word. Accepts regular expressions to search n - Repeat the last / or ? command N - Repeat the last / or ? command in the opposite direction ma - Set a marker at cursor position to come back to later. a can be any character you choose `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma % - Move cursor to next brace, bracket or comment paired to the current cursor location ## DELETION ## x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode s - Delete character under cursor, then switch to insert mode dm - Delete in direction of movement m. For m, you can also use w, b, or any other variation dd - Delete entire current line D - Delete until end of line ### YANK & PUT y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line yw - Yank a word from the cursor ynw - Yank n words from the cursor y$ - Yank till the end of the line P - Put yanked text above current line J - Join current line with the next line. Use gJ to exclude join-position space xp - Transpose two letters (delete and paste, technically) ## NORMAL MODE -> INSERT MODE ## i - Enter insert mode to the left of the cursor a - Enter insert mode to the right of the cursor I - Enter insert mode at first character of current line A - Enter insert mode at last character of current line o - Insert line below current line and enter insert mode O - Insert line above current line and enter insert mode cm - Delete (change) the character or word (w) in motion m, then enter insert mode cc - Delete current line and enter insert mode (unlike dd which leaves you in normal mode) C - Delete (change) from cursor to end of line, and enter insert mode ## VISUAL MODE ## v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines CTRL+v - Enter visual block mode and highlight exactly where the cursor moves o - Switch cursor from first & last character of highlighted block while in visual mode ~ - Swap case under selection << - Shift lines to left >> - Shift lines to right vat - Highlight all text up to and including the parent element vit - Highlight all text up to the parent element, excluding the element vac - Highlight all text including the pair marked with c (like va<, va' or va") vic - Highlight all text inside the pair marked with c ## VIM FOLD COMMANDS ## @@ -112,39 +115,38 @@ zR - decreases the foldlevel to zero -- all folds will be open. ## MISCELLANEOUS ## u - Undo U - Undo all changes on current line CTRL+R - Redo . - Redo g~ - switch case under cursor g~$ - Toggle case of all characters to end of line. g~~ - Toggle case of the current line (same as V~). gUU - switch the current line to upper case guu - switch the current line to lower case . - Repeat last change or delete ; - Repeat last f, t, F, or T command , - Repeat last f, t, F, or T command in opposite direction ## HISTORY/COMMAND BUFFER ## q: - list history in command buffer q/ - search history in command buffer CTRL+c CTRL+c - close the command buffer :set list - show hidden characters gg=G - Format HTML. Make sure FileType is set to html with :setf html CTRL+n - Press after typing part of a word. It scrolls down the list of all previously used words CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words ## COMMENT LINES (TCOMMENT PLUGIN) ## CTRL+_ CTRL+_ - Comment a line using tcomment CTRL+V - #{Select the block before commenting a block, CTRL+_ CTRL+_ - Comment a block of line using tcomment} ## WINDOW MANAGEMENT ## @@ -167,68 +169,88 @@ vim -O file1 file2 #vertical resize :vertical resize 20 CTRL+w s - Split current window horizontally CTRL+w v - Split current window vertically CTRL+w c - Close current window CTRL+w m - Move to window according to motion m CTRL+w o - Maxmize current window (note: this overwrites your current window configuration) ##MOVING WINDOWS ## CTRL+W r - Swap bottom/top if split horizontally CTRL+W R - Swap top/bottom if split horizontally CTRL+w r - Rotates the windows from left to right - only if the windows are split vertically CTRL+w R - Rotates the windows from right to left - only if the windows are split vertically CTRL+w H - Move current window the far left and use the full height of the screen CTRL+w J - Move current window the far bottom and use the full width of the screen CTRL+w K - Move current window the far top and full width of the screen CTRL+w L - Move current window the far right and full height of the screen ## NAVIGATE BETWEEN WINDOWS ## CTRL+w CTRL+w - switch between windows CTRL+w UP - Move to the top window from current window CTRL+w DOWN - Move to the bottom window from current window CTRL+w LEFT - Move to the left window from current window CTRL+w RIGHT - Move to the right window from current window ## RESIZING WINDOWS ## #Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file. CTRL+w _ - Max out the height of the current split CTRL+w | - Max out the width of the current split CTRL+w = - Normalize all split sizes, which is very handy when resizing terminal CTRL+w > - Incrementally increase the window to the right. Takes a parameter, e.g. CTRL-w 20 > CTRL+w < - Incrementally increase the window to the left. Takes a parameter, e.g. CTRL-w 20 < CTRL+w - - Incrementally decrease the window's height. Takes a parameter, e.g. CTRL-w 10 - CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 + ##BUFFERS## :ls (or :buffers) - list / show available buffers :e filename - Edit a file in a new buffer :bnext (or :bn) - go to next buffer :bprev (of :bp) - go to previous buffer :bdelete (or :bd) - unload a buffer (close a file) :bwipeout (or :bw) - unload a buffer and deletes it :b [N] - The number of the buffer you are interested to open :ball - opens up all available buffers in horizontal split window :vertical ball - opens up all available buffero in vertical split window :q - close the buffer window :help buffers - help for buffers ##TAB VIEWS## :tabe filename - opens the file in newtab :tabe new - open an empty tab :tabs - list opened tabs :tabc - close the active tab :tabn and tabp - Go to next tab or previous tab :help tabpage - help for tabs ## TAB NAVIGATION ## gt - go to next tab gT - go to previous tab {i}gt - go to tab in position i ## TAB SHORTCUTS ## CTRL+W T - Break out current window into a new tabview CTRL+W o - Close every window in the current tabview but the current one CTRL+W n - create a new window in the current tabview CTRL+W c - Close current window in the current tabview ## NERDTree Plugin ## CTRL-n - Toggle m - opens the menu ? - help i - horizontal split s - vertical split CTRL-w + <-|-> - (left or right) to navigate -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This 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 @@ -9,7 +9,7 @@ l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This 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 @@ -9,7 +9,7 @@ l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This 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 @@ -9,7 +9,7 @@ l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This 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 @@ -9,7 +9,7 @@ l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) -
tuxfight3r revised this gist
Apr 9, 2016 . 1 changed file with 21 additions and 18 deletions.There are no files selected for viewing
This 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 @@ -9,7 +9,7 @@ l - Move right $ - Move to end of line 0 - Move to beginning of line (including whitespace) ^ - Move to first character on line gg - Move to first line of file G - Move to last line of file w - Move forward to next word, with cursor on first character (use W to jump by whitespace only) @@ -30,17 +30,17 @@ L - Move cursor to last line of current visible window fc - Move cursor to next occurrence of character c on the current line. Use Fc to move backwards tc - Move cursor till next character c on the current line. Use Tc to move backwards * - Search forward for word under cursor # - Search backwards for word under cursor /word - Search forward for word. Accepts regular expressions to search ?word - Search backwards for word. Accepts regular expressions to search n - Repeat the last / or ? command N - Repeat the last / or ? command in the opposite direction ma - Set a marker at cursor position to come back to later. a can be any character you choose `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma % - Move cursor to next brace, bracket or comment paired to the current cursor location ## DELETION ## @@ -50,17 +50,18 @@ s - Delete character under cursor, then switch to insert mode dm - Delete in direction of movement m. For m, you can also use w, b, or any other variation dd - Delete entire current line D - Delete until end of line ### YANK & PUT y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line yw - yank a word from the cursor ynw - yank n words from the cursor y$ - yank till the end of the line P - Put yanked text above current line J - Join current line with the next line. Use gJ to exclude join-position space xp - transpose two letters (delete and paste, technically) ## NORMAL MODE -> INSERT MODE ## @@ -78,10 +79,11 @@ C - Delete (change) from cursor to end of line, and enter insert mode ## VISUAL MODE ## v - Enter visual mode and highlight characters V - Enter visual mode and highlight lines CTRL+v - Enter visual block mode and highlight exactly where the cursor moves o - Switch cursor from first & last character of highlighted block while in visual mode ~ - Swap case under selection vat - Highlight all text up to and including the parent element vit - Highlight all text up to the parent element, excluding the element @@ -112,7 +114,8 @@ zR - decreases the foldlevel to zero -- all folds will be open. u - Undo U - Undo all changes on current line CTRL+R - Redo . - Redo g~ - switch case under cursor g~$ - Toggle case of all characters to end of line. -
tuxfight3r revised this gist
Feb 12, 2015 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This 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 @@ -41,7 +41,6 @@ ma - Set a marker at cursor position to come back to later. a can be any charac `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma % - Move cursor to next brace, bracket or comment paired to the current cursor location ## DELETION ## -
tuxfight3r revised this gist
Feb 12, 2015 . 1 changed file with 2 additions and 5 deletions.There are no files selected for viewing
This 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 @@ -1,8 +1,7 @@ # VIM KEYBOARD SHORTCUTS ##MOVEMENT## h - Move left j - Move down k - Move up @@ -44,17 +43,15 @@ ma - Set a marker at cursor position to come back to later. a can be any charac % - Move cursor to next brace, bracket or comment paired to the current cursor location ``` ## DELETION ## x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode s - Delete character under cursor, then switch to insert mode dm - Delete in direction of movement m. For m, you can also use w, b, or any other variation dd - Delete entire current line D - Delete until end of line ### YANK & PUT -
tuxfight3r revised this gist
Feb 12, 2015 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This 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 @@ -1,7 +1,8 @@ # VIM KEYBOARD SHORTCUTS ###MOVEMENT ``` h - Move left j - Move down k - Move up @@ -41,18 +42,21 @@ ma - Set a marker at cursor position to come back to later. a can be any charac `a - Move cursor to exact position of the marker you set with ma 'a - Move cursor to the first character of the line marked with ma % - Move cursor to next brace, bracket or comment paired to the current cursor location ``` ### DELETION ``` x - Delete character forward (under cursor). use x do delete backwards (before cursor) r - Replace single character under cursor, and remain in normal mode s - Delete character under cursor, then switch to insert mode dm - Delete in direction of movement m. For m, you can also use w, b, or any other variation dd - Delete entire current line D - Delete until end of line ``` ### YANK & PUT y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line -
tuxfight3r revised this gist
Jan 23, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -56,6 +56,9 @@ D - Delete until end of line y - Yank (copy) highlighted text yy - Yank current linepPut (paste) yanked text below current line yw - yank a word from the cursor ynw - yank n words from the cursor y$ - yank till the end of the line P - Put yanked text above current line J - Join current line with the next line. Use gJ to exclude join-position space -
tuxfight3r revised this gist
Jan 22, 2015 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This 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 @@ -89,16 +89,19 @@ vic - Highlight all text inside the pair marked with c zf#j - creates a fold from the cursor down # lines. zf/string - creates a fold from the cursor to string . zo - opens a fold at the cursor. zO - opens all folds at the cursor. za - Toggles a fold at the cursor. zc - closes a fold at the cursor. zM - closes all open folds. zd - deletes the fold at the cursor. zE - deletes all folds. zj - moves the cursor to the next fold. zk - moves the cursor to the previous fold. zm - increases the foldlevel by one. zr - decreases the foldlevel by one. zR - decreases the foldlevel to zero -- all folds will be open. [z - move to start of open fold. ]z - move to end of open fold. -
tuxfight3r revised this gist
Jan 22, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This 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 @@ -108,11 +108,11 @@ u - Undo U - Undo all changes on current line CTRL+r - Redo g~ - switch case under cursor g~$ - Toggle case of all characters to end of line. g~~ - Toggle case of the current line (same as V~). gUU - switch the current line to upper case guu - switch the current line to lower case . - Repeat last change or delete ; - Repeat last f, t, F, or T command -
tuxfight3r revised this gist
Jan 22, 2015 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This 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 @@ -108,6 +108,12 @@ u - Undo U - Undo all changes on current line CTRL+r - Redo g~ - switch case under cursor g~$ - Toggle case of all characters to end of line. g~~ - Toggle case of the current line (same as V~). gUU - switch the current line to upper case guu - switch the current line to lower case . - Repeat last change or delete ; - Repeat last f, t, F, or T command , - Repeat last f, t, F, or T command in opposite direction
NewerOlder