"o" to enter insert mode(i = insert, a = append, o = newline) 2. in insert mode, ESC or Ctrl+[ to enter normal mode 3. in normal mode, hit "v" or "V" to enter visual mode 4. in visual mode, hit ESC or Ctrl+[ to normal mode
:tabe create a new tab. - gt to switch to next tab, gT to previous tab. (I map gt and gT to F7 and F8 in my vimrc) - :new to create a horizontal split window, :vnew or :vs to create a vertical split window.
at the same time with horizontal split window. - vi -O a.rb b.rb same as above, but in vertical split window. - vi -p a.rb b.rb to open ﬁles with tabs. - vi http://www.eddie.com.tw will read the source content into vim directly.
to last section. - vit will visually select content between the tag, while vat will even including the tag. - vi" will visually select content between current double quotes. - viw will select the current word.
the cursor. - C like D, but enter insert mode. - dG will clear all content after the cursor, dgg will clear all content before the cursor. - x remove a character. - . to repeat last action. - dd to delete whole line. - 3dd to delete 3 lines.
- cw, ciw same as above, but enter insert mode. - r to replace current character. - J to concatenate current line with next line, 3J will concatenate next 3 lines. - > to add indentation, < to remove indentation.