VI or VIM EDITOR CHEAT SHEET There are two different modes of ...

Reviews
Shared by: armani11
Stats
views:
148
rating:
not rated
reviews:
0
posted:
11/9/2008
language:
English
pages:
0
VI or VIM EDITOR CHEAT SHEET There are two different modes of operation within vi: the command mode and the insert mode. The following commands are issued while in the command mode. The insert mode will insert whatever text you type into the current file (see Inserting Text section below). To return to command mode from insert mode, hit the ESCape key. (Note: This is always a safe thing to do.) Editor commands preceded by ‘:’, ‘/’, or ‘?’ will appear in the lower left hand corner of the screen. Other commands will not appear on the screen. A SENTENCE is defined to end at a ‘.’, ‘!’, or a ‘?’ which is followed by either the end of the line or two spaces. A PARAGRAPH is defined to begin after each empty line. CRUISING AROUND ↑ or k ↓ or j → or l move cursor up move cursor down move cursor right DELETING TEXT x nx dw dd ndd D dG delete current character delete next characters delete current word delete current line delete next lines delete to end of line delete from current line to bottom ← or h move cursor left + move cursor to next line % 0 or ^ $ n| w b e ) ( } { nG G move cursor to previous line go to matching parenthesis or bracket go to the beginning of line go to end of line go to column skip forward one word skip backward one word go to end of current word skip to next sentence skip to previous sentence skip to next paragraph skip to previous paragraph go to line go to bottom IN SEARCH OF TEXT /string ?string n :n,m s/str1/str2/g :1,$ s/str1/str2/g search forward for search backward for repeat last search command search from line to line for and replace with search and replace all occurences of with CUTTING AND PASTING yw yb Y yank a copy of the current word yank a copy of the previous word yank a copy of current line yank a copy of the next lines put last yanked or deleted or changed text after cursor put last yanked or deleted or changed text before cursor INSERTING TEXT a A i I o O append after cursor append after end of line insert before cursor insert at beginning of line open new line below current line open new line above current line nY p P FIXING GOOFS u U :e! undo last change restore current line re-edit current file without saving changes CHANGING TEXT rx Rtext J replace single character with replace with join next line with current line FILE MANIPULATION :x or :wq :q! :w name :w name quit and save changes quit without saving changes write entire file to write (save) changes cwtext change word to . repeat last command (text change, delete, etc.) For a more detailed reference refer to: http://www.at.vcu.edu/faq/unix/vieditor.html

Related docs
Byte of Vim
Views: 250  |  Downloads: 3
vi vim graphical cheat sheet
Views: 91  |  Downloads: 4
vi-vim-cheat-sheet.pdf
Views: 49  |  Downloads: 10
vi-vim-cheat-sheet.pdf
Views: 19  |  Downloads: 1
vi-vim-cheat-sheet-qwerty
Views: 3  |  Downloads: 0
vi-vim-cheat-sheet.pdf
Views: 0  |  Downloads: 0
just another vi cheat sheet
Views: 0  |  Downloads: 0
Vi Editor Help
Views: 114  |  Downloads: 7
Other docs by armani11
Service providers business plan financials
Views: 1018  |  Downloads: 183
LETTERHEAD
Views: 515  |  Downloads: 54
Form FinCEN102A (PDF) Instructions
Views: 214  |  Downloads: 1
TRAVEL ITINERARY
Views: 556  |  Downloads: 46
Information release authorization
Views: 325  |  Downloads: 7
edens_1b-all
Views: 147  |  Downloads: 1
CELEBRITY HEADS
Views: 482  |  Downloads: 0
craven-all
Views: 185  |  Downloads: 4
alspaugh-all
Views: 556  |  Downloads: 4
Homeopathic Intake Form
Views: 620  |  Downloads: 23
Halliburton Co Ammendments and Bylaws
Views: 128  |  Downloads: 0