VI Cheat Sheet: Difference between revisions
Jump to navigation
Jump to search
(Created page with " =Mode= i - insert mode esc - normal mode =Command= :w filename - write to file system with specific file name :w - write file out if vim already knows the file name :wq...") |
|||
Line 27: | Line 27: | ||
* - searches for the current text the cursor is on | * - searches for the current text the cursor is on | ||
=Copy/Paste= | =Copy/Paste/Cut= | ||
v - enter visual mode (select text with hjkl) | v - enter visual mode (select text with hjkl) | ||
y - yanks text | y - yanks text | ||
dd Cut Line | |||
:put - paste text after current line | :put - paste text after current line | ||
p - paste at current position | p - paste at current position |
Revision as of 18:40, 9 August 2021
Mode
i - insert mode esc - normal mode
Command
:w filename - write to file system with specific file name :w - write file out if vim already knows the file name :wq - writes and quits vim :q! - quits vim when a buffer has edits :q - quits vim shift A - goes into insert mode at end of line (didn't mention on video)
j - down k - up h - left l - right gg - top of file G - bottom of tile number gg - goes to specific line number
search/find/replace
/searchTerm - searches for current text n - goes to the next location of the searched text ?searchTerm - searches backwards for current text * - searches for the current text the cursor is on
Copy/Paste/Cut
v - enter visual mode (select text with hjkl) y - yanks text dd Cut Line :put - paste text after current line p - paste at current position