Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
home_server:home_server_setup:other_services:vim [2023-08-26 Sat wk34 11:14] – [Moving around in the file] baumkphome_server:home_server_setup:other_services:vim [2024-03-24 Sun wk12 10:39] – [Moving around in the file] baumkp
Line 1: Line 1:
-{{tag>vim neovim command linux debian ubuntu text editor setup customise customisation cheatsheet}}+{{tag>vim neovim command linux debian text editor setup customise customisation cheatsheet}}
 =====VIM Customisation===== =====VIM Customisation=====
  
Line 55: Line 55:
 These Vim commands and keys work both in command mode and visual mode. These Vim commands and keys work both in command mode and visual mode.
 ^  Vim Command  ^ Action  ^ ^  Vim Command  ^ Action  ^
-|  j or Up Arrow  | Move the cursor up one line | +|  j or Up Arrow  | Move the cursor up one line  | 
-|  k or Down Arrow  |Down one line | +|  k or Down Arrow  |Down one line  | 
-|  h or Left Arrow  | Left one character | +|  h or Left Arrow  | Left one character 
-|  l or Right Arrow  | Right one character | +|  l or Right Arrow  | Right one character 
-|   +|  Ctrl + b  | Move back one full screen 
-|  w  | Move to next word|+|  Ctrl + f  | Move forward one full screen 
 +|  Ctrl + d  | Move forward 1/2 a screen 
 +|  Ctrl + u  | Move back 1/2 a screen 
 +|  Ctrl + e  | Move screen down one line (without moving cursor) 
 +|  Ctrl + y  | Move screen up one line (without moving cursor) 
 +|  Ctrl + o  | Move backward through the jump history 
 +|  Ctrl + i  | Move forward through the jump history 
 +|  gg  | Move to top of file | 
 +|  Shift + g  | move to end of file | 
 +|  w  | Move to next word |
 |  W  | Move to next blank delimited word  | |  W  | Move to next blank delimited word  |
 |  e  | To the end of a word  | |  e  | To the end of a word  |
Line 161: Line 170:
 |  %%!}fmt%%  | Align all lines at the current position  | |  %%!}fmt%%  | Align all lines at the current position  |
 |  %%5!!fmt%%  | Align the next 5 lines  | |  %%5!!fmt%%  | Align the next 5 lines  |
-=====Undo and redo=====+=====Undoredo and report=====
 ^  Vim Command  ^ Action  ^ ^  Vim Command  ^ Action  ^
-|  u  | Undo the last action | +|  u  | Undo the last action 
-|  U  | Undo all the latest changes that were made to the current line | +|  U  | Undo all the latest changes that were made to the current line  | 
-|  Ctrl + r  | Redo.  |+|  Ctrl + r  | Redo  | 
 +|    | repeat last command  |
 =====Search===== =====Search=====
 ^  Vim Command  ^ Action  ^ ^  Vim Command  ^ Action  ^
Line 348: Line 358:
   *[[https://web.archive.org/web/20190515212443/http://bullium.com/support/vim.html|Vim Commands Cheat Sheet]]   *[[https://web.archive.org/web/20190515212443/http://bullium.com/support/vim.html|Vim Commands Cheat Sheet]]
   *[[https://web.archive.org/web/20190515212443/http://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program|How to copy text from vim to an external program?]]   *[[https://web.archive.org/web/20190515212443/http://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program|How to copy text from vim to an external program?]]
 +  *[[https://web.archive.org/web/20230509142719/http://www.terminally-incoherent.com/blog/reference/vim-cheat-sheet/|Another Vim Cheat Sheet]] 
 +  *[[https://web.archive.org/web/20211208001807/https://petro.tanrei.ca/2010/8/working-with-vim-and-ipython.html|Working with Vim and IPython]]
 ====Requires More Research==== ====Requires More Research====
  
 These links should be explored to see what additional information could be gathered for this cheat sheet. These links should be explored to see what additional information could be gathered for this cheat sheet.
   *[[https://danielmiessler.com/study/vim/|A vim Tutorial and Primer]]   *[[https://danielmiessler.com/study/vim/|A vim Tutorial and Primer]]
-  *[[http://www.terminally-incoherent.com/blog/reference/vim-cheat-sheet/|Another Vim Cheat Sheet]] 
   *[[http://www.terminally-incoherent.com/blog/2008/10/27/vim-cheatsheet/|Vim Cheatsheet]]   *[[http://www.terminally-incoherent.com/blog/2008/10/27/vim-cheatsheet/|Vim Cheatsheet]]
   *[[http://www.glump.net/howto/desktop/vim-graphical-cheat-sheet-and-tutorial|Graphical vi-vim Cheat Sheet and Tutorial]]   *[[http://www.glump.net/howto/desktop/vim-graphical-cheat-sheet-and-tutorial|Graphical vi-vim Cheat Sheet and Tutorial]]
   *[[http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html|Graphical vi-vim Cheat Sheet and Tutorial]]   *[[http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html|Graphical vi-vim Cheat Sheet and Tutorial]]
-  *[[http://amix.dk/blog/post/19334|Vim tips: Visual Search]] 
   *[[https://github.com/amix/vimrc|The Ultimate vimrc]]   *[[https://github.com/amix/vimrc|The Ultimate vimrc]]
   *[[https://github.com/davidhalter/jedi-vim|check out Jedi for auto completion]]   *[[https://github.com/davidhalter/jedi-vim|check out Jedi for auto completion]]
-  *[[http://jaredforsyth.com/projects/vim-debug/|NERD Commenter Command]] 
   *[[http://j605.wordpress.com/2011/10/08/a-python-debugger-for-vim/|A python debugger for vim]]   *[[http://j605.wordpress.com/2011/10/08/a-python-debugger-for-vim/|A python debugger for vim]]
-  *[[http://files.swaroopch.com/vim/byte_of_vim_v051.pdf|A Byte of Vim]] 
-  *[[https://lepture.com/en/2012/vundle-vs-pathogen|Vundle vs Pathogen]] 
-   *[[http://petro.tanrei.ca/2010/8/working-with-vim-and-ipython.html|Working with Vim and IPython]] 
   *[[http://github.com/ivanov/vim-ipython|vim-ipython - A two-way integration between Vim and IPython]]   *[[http://github.com/ivanov/vim-ipython|vim-ipython - A two-way integration between Vim and IPython]]
-  *[[http://appsweets.net/wasavi/|wasavi (VI editor for any web page)]] 
   *[[http://codemirror.net/|CodeMirror]]   *[[http://codemirror.net/|CodeMirror]]
-  *[[http://lalashan.mcmaster.ca/theobio/projects/index.php/TextAid|TextAid]] 
   *[[http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/|Working Productively in Bash's Vi Command Line Editing Mode (with Cheat Sheet)]]   *[[http://www.catonmat.net/blog/bash-vi-editing-mode-cheat-sheet/|Working Productively in Bash's Vi Command Line Editing Mode (with Cheat Sheet)]]
   *[[http://hackaday.com/2017/06/21/vim-normalization/|VIM Normalization]]   *[[http://hackaday.com/2017/06/21/vim-normalization/|VIM Normalization]]
   *[[https://opensource.com/article/17/2/vim-plugins-writers?sc_cid=70160000001206xAAA|Awesome vim plugins for writers]]   *[[https://opensource.com/article/17/2/vim-plugins-writers?sc_cid=70160000001206xAAA|Awesome vim plugins for writers]]
-  *[[https://soledadpenades.com/2013/02/24/using-syntastic-jshint-for-javascript-syntax-checking-on-vim/|Using Syntastic+JSHint for Javascript syntax checking on Vim]]+  *[[https://soledadpenades.com/posts/2013/using-syntastic-jshint-for-javascript-syntax-checking-on-vim/|Using Syntastic+JSHint for Javascript syntax checking on Vim]]
  
 ---- ----