docs:vim:commands

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:vim:commands [2007/12/30 21:04] billhdocs:vim:commands [2008/08/03 00:25] (current) – external edit 127.0.0.1
Line 62: Line 62:
 |  :reg  |show current registers (like current clipboard entries)  | |  :reg  |show current registers (like current clipboard entries)  |
 |  "[char][command]  |char: register to use, command: p/P/y\\ //(if yanking, you probably want to block select first)//  | |  "[char][command]  |char: register to use, command: p/P/y\\ //(if yanking, you probably want to block select first)//  |
- 
  
 ===== Editing ===== ===== Editing =====
-|  i  |insert| +|  i\\ I  |insert at cursor/insert at beginning of current line 
-|   |replace (temporary mode)+|  gi  |insert text in the same position as where insert mode was last stopped  
-|  a  |append|+|  a\\ A  |append at cursor/append at end of current line | 
 +|  o\\ O  |begin a new line below/above the current line  | 
 +|  r\\ R  |replace one char under cursor/replace until escape is pressed | 
 +|  c<motion>  |change with motion | 
 +|  C  |change from cursor to end of line  |
 |  cw  |change word (delete remaining portion of the word, and begin editing)| |  cw  |change word (delete remaining portion of the word, and begin editing)|
 |  c(same options as d)  |change line, change word etc...| |  c(same options as d)  |change line, change word etc...|
 +|  d<motion>  |delete with motion  |
 |  dd  |delete line| |  dd  |delete line|
 |  de  |delete word (no space)| |  de  |delete word (no space)|
Line 77: Line 81:
 |  u   |undo| |  u   |undo|
 |  U   |undo all for line| |  U   |undo all for line|
-|  Ctrl-r  |undo an undo (reverse direction)| +|  Ctrl-r  |undo an undo (reverse direction) | 
-|  >  |indent| +|  >\\ >>  |indent in block select mode, indent current line 
-|  <  |outdent|+|  <\\ <<  |outdent in block select mode, outdent current line | 
 + 
 +===== Motions ===== 
 +A motion is a command that moves the cursor.  You can use motions with many other commands when not in insert mode. 
 +|  w\\ e  |to start/end of word  | 
 +|  b  |to beginning of word  | 
 +|  4j  |4 lines down  | 
 +|  f{char}\\ F{char}  |forward on current line to the next occurrence of {char} inclusive/exclusive 
 +|  t{char}\\ T{char}  |backward on current line to the previous occurrence of {char} inclusive/exclusive 
 +|  ;  |Repeat latest f, t, F or T [count] times  | 
 +|  ,  |Repeat latest f, t, F or T in opposite direction [count] times  | 
 +|  [number]gg\\ [number]G  |go to line number, or first line if [number] is excluded 
 +|  (\\ )  |move sentences forward/backward 
 +|  {\\ }  |move paragraphs forward/backward 
 + 
 +===== Text Object Selection ===== 
 +These commands word in Visual modes. 
 +|  aw  |a word, trailing whitespace is included 
 +|  iw  |inner word  | 
 +|  a[\\ a]  |a [] block (use i for inner block) 
 +|  a(\\ a)\\ ab  |a () block (use i for inner block) 
 +|  a<\\ a>|a <> block (use i for inner block) 
 +|  a{\\ a}|a {} block (use i for inner block) 
 + 
 +===== Marks ===== 
 +FIXME 
 + 
 +===== Various Commands ===== 
 +|  ga  |show value of character under the cursor in decimal, hex, and octal  | 
 +|  g8  |show the hex values of the bytes used in the character under the cursor 
  
 ===== Code Completion ===== ===== Code Completion =====
 :help ins-completion :help ins-completion
 +
 +===== Abbreviations =====
 +:help abbreviations
 +
 +You can use abbreviations to quickly enter a short sequence of characters that will be expanded into your defined sequence of characters.  This can be useful to avoid typing monotonous things such as "document.getElementById" or to correct common spelling mistakes such as "teh" etc...
 +
 +Examples:
 +|:ab de document.getElementById('  |now type de<space>, and de turns\\ into document.getElementById('  |
  
 ===== Settings ===== ===== Settings =====
  • docs/vim/commands.1199073858.txt.gz
  • Last modified: 2008/08/03 00:25
  • (external edit)