vimtips

1K posts

vimtips

vimtips

@vimtips

Like VI or VIM? So do I! Use it more effectively with daily tips. Catch them all at http://t.co/ty7XLqgePG.

Indiana Sumali Ağustos 2008
19 Sinusundan21K Mga Tagasunod
vimtips
vimtips@vimtips·
gq{movement} to wrap text, or just gq while in visual mode. gqap will format the current paragraph. is.gd/7Onk
English
1
20
52
0
vimtips
vimtips@vimtips·
g< CTRL-G > to see technical information about the file, such as how many words are in it, or how many bytes it is. is.gd/9cYj
English
1
23
63
0
vimtips
vimtips@vimtips·
:%s/[.!?]\_s\+\a/\U&\E/g will uppercase the first letter of each sentence (except the very first one). is.gd/4xZW
English
3
14
35
0
vimtips
vimtips@vimtips·
:g/_pattern_/s/^/#/g will comment out lines containing _pattern_ (if '#' is your comment character/sequence) (via @vrybas_)
English
0
17
80
0
vimtips
vimtips@vimtips·
:vimgrep /stext/ **/*.txt | :copen searches for stext recursively in *.txt files and show results in separate window (via @danechkin)
English
0
17
56
0
vimtips
vimtips@vimtips·
%s/^ \ n/ / to delete all empty lines (remove spaces from command!) (via @marekkubis)
English
2
10
41
0
vimtips
vimtips@vimtips·
ggVG= will auto-format the entire document
English
6
22
64
0
vimtips
vimtips@vimtips·
In gvim, change the cursor depending on what mode you are in (normal, insert, etc): is.gd/9dq0
English
1
5
25
0
vimtips
vimtips@vimtips·
CTRL-w | and CTRL-W _ maximize your current split vertically and horizontally, respectively. CTRL-W = equalizes 'em.
English
1
19
54
0
vimtips
vimtips@vimtips·
Basic commands 'f' and 't' (like first and 'til) are very powerful. See :help t or :help f. is.gd/cCHy
English
1
16
25
0
vimtips
vimtips@vimtips·
:tabo will close all open tabs except the active one.
English
3
17
37
0
vimtips
vimtips@vimtips·
/\%>80v.\+ with search highlighting (:set hlsearch) will highlight any text after column 80. is.gd/8ekT
English
1
10
24
0
vimtips
vimtips@vimtips·
/< CTRL-r >< CTRL-w > will pull the word under the cursor into search. is.gd/7Onk
English
2
16
49
0
vimtips
vimtips@vimtips·
"+y to copy to the X11 (or Windows) clipboard. "+p to paste from it. is.gd/9dkI
English
2
12
34
0
vimtips
vimtips@vimtips·
ga will display the ASCII, hex, and octal value of the character under the cursor. is.gd/4xZW
English
0
21
45
0
vimtips
vimtips@vimtips·
[I (that's bracket-open, capital-i) shows lines containing the word under the cursor (via @nvie)
English
3
18
74
0
vimtips
vimtips@vimtips·
% matches brackets {} [] (), and with matchit.vim, also matches def/end, < ?php/?>, < p>/< /p>, etc. is.gd/N4W
English
1
9
31
0
vimtips
vimtips@vimtips·
:40,50m30 will move lines 40 through 50 to line 30. Most visual mode commands can be used w/ line numbers. is.gd/cCHy
English
1
16
44
0
vimtips
vimtips@vimtips·
In your ~/.vimrc, `set clipboard=unnamed`. Now all operations work with the OS clipboard. No need for "+, "* (via @panozzaj)
English
3
60
174
0