Vim is mah editor.
I can't work without Vim (sadly). KTHX. BAI
Life is suffering.
PAYS RENT
SUPER BORING COMPARED TO A WEB APP.
PAYS RENT
SUPER BORING COMPARED TO A WEB APP.
You can make use of Vim like the latter.
Vim Script enables developers to create plugins.
But don't abuse plugins, make use of what really is essential.
Vim ne Vi
ne eq "not equal"
eq === "equal"
:e file
- edit file.(open):q
- quit.
:w
- write.(save):r
- read.(insert another file)!date
- call an external application an pipe it to Vim.h,j,k,l
.left,down,up,right
.fx | forward - Moves the cursor to the next character defined by x |
---|---|
tx | Moves the cursor to the next character after x |
Fx | Inverse action of fx . |
w | Moves the cursor to the first word infront of it. |
b | Inverse action of w . |
0 | Moves the cursor to the beginning of the current line. |
^ | Moves the cursor to the first character of the current line. |
$ | Moves the cursor to the last character of the current line. |
) | Moves the cursor to the next sentence. |
---|---|
( | Inverse action of ) . |
<C-F> | Moves the cursor through a whole window block. |
<C-B> | Inverse action of C-F . |
gg | Moves the cursor to the beginning of the file. |
G | Moves the cursor to the end of the file. |
numG | Moves the cursor to the line num. |
H | Moves the cursor to the top of the window. |
---|---|
M | Moves the cursor to the half of the window. |
L | Inverse action of H . |
* | Selects the word under cursor, and seeks forward for the next occurrence. |
# | Inverse action of * . |
/palabra | Seeks the word after '/', and moves the cursor. |
?palabra | Inverse action of '/' . |
ma | Creates a Mark in current position |
---|---|
`a | Moves the cursor to the mark 'a' in the file. |
`. | Go to the last modification made. |
v | Selection per character. |
---|---|
V | Selection per lines. |
<C-V> | Underlines blocks of characters. |
d{acción} | delete. Erase(cuts) the text, and sends it to the clipboard. |
dd | Erase(cut) the entire line under the cursor, and sends it to the clipboard. |
y | yank. (Copy). Similar action as d , but this only sends to the clipboard. |
c | cut. Similar action as d , but this ones activates insert mode. |
p | paste. Paste what is in current clipboard. |
i | Enters Insert Mode. |
---|---|
I | Enters Insert Mode, and places the cursor at the beginning of the current line. |
a | Inverse action of i . |
A | Inverse action of I . |
o | Creates a new line below current position of the cursor, and enters Insert mode. |
O | Inverse action of o . |
qkeyword | Starts recording of a macro under the name keyword. |
---|---|
q | Ends the recording of the macro. |
@registro | Activates the macro keyword. |
. |
Dot. Repeats the last action made. |
]p | Pre-formats the text that will be paste. |
---|---|
% | If the cursor is placed at {,[,(, seeks for the related closing cursor. |
>> | Formats a block of text. |
<< | Inverse action of <<. |
/pattern
to search and move to a keyword.%
to move between logic blocks and loops.*
.ngg
where n is the number of a line.Three simple steps:
:s
to automagically substitute a keyword in the entire file..
to insert the last word written.C-N
.C-X + C-F
.:abbr Lunix Linux
to fix a keyword in the entire file.C-w + s
to divide the window area horizontally.C-w + v
to divide the window area vertically.:r file
to insert a entire content of a file to the current window.:r ! grep 192.168.1.102 log
to insert text from the stream of another application.=G
.>>
.>>
, use <<
.More than practice, mastery comes from analyzing your actions. Every time you take the time to analyze and study your moves, you can slowly grow to a zero point.
Every IDE, text editor has its learning curve, ride it.
Like in any other Zen practice and philosophy, you have to think first, and then act.
Thanks for your time.
Don't use Emacs.
No, I kid ^_^! use whatever you want.
But please, please don't use nano, Por favor.
gnusosa