pakeisk požiūrį subscribe to feed

VIM editor cheat sheet

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 move cursor up
? or j move cursor down
? or l move cursor right
? or h move cursor left
+ move cursor to next line
- move cursor to previous line
% go to matching parenthesis or bracket
0 or ^ go to the beginning of line
$ go to end of line
n| go to column
w skip forward one word
b skip backward one word
e go to end of current word
) skip to next sentence
( skip to previous sentence
} skip to next paragraph
{ skip to previous paragraph
nG go to line
G go to bottom


INSERTING TEXT
a append after cursor
A append after end of line
i insert before cursor
I insert at beginning of line
o open new line below current line
O open new line above current line

CHANGING TEXT
rx replace single character with
Rtext replace with
J join next line with current line
cwtext change word to
. repeat last command (text change, delete, etc.)


DELETING TEXT
x delete current character
nx delete next characters
dw delete current word
dd delete current line
ndd delete next lines
D delete to end of line
dG delete from current line to bottom

IN SEARCH OF TEXT
/string search forward for
?string search backward for
n repeat last search command
:n,m s/str1/str2/g search from line to line for
and replace with
:1,$ s/str1/str2/g search and replace all occurences of
with

CUTTING AND PASTING
yw yank a copy of the current word
yb yank a copy of the previous word
Y yank a copy of current line
nY yank a copy of the next lines
p put last yanked or deleted or changed text after cursor
P put last yanked or deleted or changed text before cursor

FIXING GOOFS
u undo last change
U restore current line
:e! re-edit current file without saving changes

FILE MANIPULATION
:x or :wq quit and save changes
:q! quit without saving changes
:w name write entire file to
:w name write (save) changes

For a more detailed reference refer to: http://www.at.vcu.edu/faq/unix/vieditor.html
h1 pakeisk požiūrį
magic eight ball, stebuklingas rutuliukas

Gyvenimo principai

When you're riding, only the race in which you're riding is important.Bill Shoemaker, Jockey
"Effort, not ability, makes the biggest difference in achievement."
Bill Clinton, 42nd President of the United States
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover.
Mark Twai
If you do what you've always done, you'll get what you've always gotten
| Įrašyti naują |


Kiekvieną dieną reikėtų laikyti atskiru gyvenimu.

Kodėl įsimyli vyrai:50 proc. jaučia nepaliaujamą maudimą apatinėje pilvo dalyje.29 proc. negali be mamytės.13 proc. mėgsta, kas minkšta ir apvalu.6 proc. tingi išsiplauti puodelį.2 proc. - iš neturėjimo ką veikti.Kodėl įsimyli moterys:61 proc. negali gyventi be kokių nors papildomų problemų.13 proc. "užkimba" dėl pinigų.11 proc. neklauso mamos.9 proc. myli gyvūnus.
6 proc. - tiesiog kvailės. Daugiau anekdotų..? Žinai geresnį? Rašyk!

linked in Tygas
Don't know Lithuanian?
Read it in english!
99% garantija