learning vim
This commit is contained in:
parent
68575d2def
commit
4ada6d83c9
44
new-info.txt
44
new-info.txt
@ -255,7 +255,7 @@ Commands:
|
||||
CTRL-U -- delete until beginning
|
||||
CTRL-P -- complete the word or repeate previous. (P)revious
|
||||
CTRL-N -- complete the word. (N)ext
|
||||
There is OMNI completion. Check it out later.
|
||||
There is OMNI completion (like intelisence). Check it out later.
|
||||
CTRL-A in Insert mode to insert text, that were typed during previous
|
||||
insert mode
|
||||
CTRL-@ -- does CTRL-A and then exits Insert mode
|
||||
@ -276,6 +276,48 @@ Commands:
|
||||
:CTRL-K {digraph} -- to type digraph
|
||||
:CTRL-O {command} -- to execute command in insert mode
|
||||
|
||||
Editing formatted text (25):
|
||||
:set textwidth=79 -- automatically insert line breaks
|
||||
gq -- format text by text width
|
||||
v4jgq -- format 4 lines
|
||||
gqap -- format a paragraph
|
||||
gggqG -- format the whole file
|
||||
:{range}center [width] -- center alignment. :1,5center 40
|
||||
:{range}right [margin] -- right-justifies the text
|
||||
:{range}left [margin] -- add's left margin to text
|
||||
:set autoindent -- when a new line is started it gets the same indent
|
||||
as previous line.
|
||||
:set shiftwidth -- changes amount of spaces added by >>
|
||||
:set linebreak -- turn off word breaks in long lines
|
||||
:set virtualedit=all -- for moving the cursor to positions where there
|
||||
isn't any text
|
||||
:set virtualedit= -- turn it off
|
||||
gr{let} -- makes sure the new character takes the right amount of screen
|
||||
space. Extra spaces or tabs are inserted to fill the gap.
|
||||
|
||||
Repeating (26):
|
||||
gv -- selects the same area again
|
||||
CTRL-A -- increase number under cursor
|
||||
CTRL-X -- subtract number under cursor
|
||||
ls | vim - -- open vim from stdin
|
||||
There is also information about scripts, but lets skip it for now
|
||||
|
||||
Search commands and patterns (27):
|
||||
:set ignorecase -- turn off case sensitive during search
|
||||
:set noignorecase -- undo above
|
||||
:set ignorecase smartcase --
|
||||
pattern matches ~
|
||||
word word, Word, WORD, WoRd, etc.
|
||||
Word Word
|
||||
WORD WORD
|
||||
WoRd WoRd
|
||||
=== I SKIPED REST OF TUTOR, BACK LATER ===
|
||||
|
||||
Folding (28):
|
||||
It's all about shrimping a bunch of lines to one.
|
||||
=== I SKIPED REST OF TUTOR, BACK LATER ===
|
||||
|
||||
|
||||
Hints:
|
||||
There is lowercase and uppercase marks. Uppercase marks are global, they
|
||||
can help you to switch between the files. Lowercase marks are local for
|
||||
|
||||
Loading…
Reference in New Issue
Block a user