User Tools

Site Tools


vim

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
vim [2024/01/24 23:12] – [vim shortcuts] karciovim [2024/07/24 17:53] (current) karcio
Line 1: Line 1:
-{{tag>vim shortcut keybinding}}+  * [[vimrc|vim config file]] 
 +  * [[vimshortcut|vim shortcuts]] 
 +  * [[vimcompile|vim compile]]
  
-==== vim shortcuts ====+{{tag>vim shortcut keybinding dotfile}}
  
-__**vim modes**__ 
  
-  * normal mode - "ESC" 
-  * insert mode - "i" 
-  * command mode - ":" 
- 
-__**Normal mode**__ 
- 
-**h** - move left 
- 
-**j** - move down 
- 
-**k** - move up 
- 
-**l** - move right 
- 
-**w** - jump to next word 
- 
-**W** - jump to next string 
- 
-**b** - jump to previous word 
- 
-**B** - jump to previous string 
- 
-**0** - move to first position in line 
- 
-**$** - move to end of the line 
- 
-**z + enter** - move to the top 
- 
-**2gg** or **2G** - move to line 2 
- 
-**ctrl g** show how many lines in file 
- 
- 
-__delete__ 
- 
-**x** - delete char where cursor is 
- 
-**X** - delete char before cursor 
- 
-**dw** - __d__ - delete __w__ - motion 
- 
-**dl** - delete word on left 
- 
-**dk** - delete up line 
- 
-**dh** - delete down line  
- 
-**dj** - delete word on right 
- 
-**d0** - delete all to begin line 
- 
-**dd** or **D**- delete all line 
- 
-**5dw** - delete 5 words ( delete word 5 times) 
- 
-**3w** - move to third word (repeat word motion 3 times) 
- 
-**d3w** - delete 3 words  
-**2d3w** - delete 3 words 2 times 
- 
-**.** - repeat last operation 
- 
- 
-__cut,copy,paste__ 
- 
-**y** then **p** - copy and paste before cursor 
- 
-**y** then **P** - copy and paste after cursor 
- 
-**yy** then **p** - copy line and paste 
- 
-**v** then **h,j,k,l** to select text, then **p** - select text and paste 
vim.1706137920.txt.gz · Last modified: 2024/01/24 23:12 by karcio