aguea asia
vimtips
@vimtips
Like VI or VIM? So do I! Use it more effectively with daily tips. Catch them all at
vimtweets.com
.
Joined August 2008
Tweets
1,027
Following
19
Followers
20,969
Likes
0
Photos and videos
Photos and videos
Tweets
vimtips
@vimtips
30 Jun 2016
gq{movement} to wrap text, or just gq while in visual mode. gqap will format the current paragraph.
is.gd/7Onk
1
20
52
vimtips
@vimtips
15 Jun 2016
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
1
23
63
vimtips
@vimtips
13 Jun 2016
:%s/[.!?]\_s\ \a/\U&\E/g will uppercase the first letter of each sentence (except the very first one).
is.gd/4xZW
3
14
35
vimtips
@vimtips
7 Jun 2016
:g/_pattern_/s/^/#/g will comment out lines containing _pattern_ (if '#' is your comment character/sequence) (via
@vrybas_
)
17
80
vimtips
@vimtips
6 Jun 2016
:vimgrep /stext/ **/*.txt | :copen searches for stext recursively in *.txt files and show results in separate window (via
@danechkin
)
17
56
vimtips
@vimtips
2 Jun 2016
%s/^ \ n/ / to delete all empty lines (remove spaces from command!) (via
@marekkubis
)
2
10
41
vimtips
@vimtips
31 May 2016
ggVG= will auto-format the entire document
6
22
64
vimtips
@vimtips
30 May 2016
In gvim, change the cursor depending on what mode you are in (normal, insert, etc):
is.gd/9dq0
1
5
24
vimtips
@vimtips
27 May 2016
To search for a URL without backslashing, search backwards! Example: ?
somestuff.com
is.gd/4xZW
1
5
21
vimtips
@vimtips
26 May 2016
CTRL-w | and CTRL-W _ maximize your current split vertically and horizontally, respectively. CTRL-W = equalizes 'em.
1
19
54
vimtips
@vimtips
25 May 2016
Basic commands 'f' and 't' (like first and 'til) are very powerful. See :help t or :help f.
is.gd/cCHy
1
16
25
vimtips
@vimtips
23 May 2016
:tabo will close all open tabs except the active one.
3
17
37
vimtips
@vimtips
20 May 2016
/\%>80v.\ with search highlighting (:set hlsearch) will highlight any text after column 80.
is.gd/8ekT
1
10
24
vimtips
@vimtips
19 May 2016
/< CTRL-r >< CTRL-w > will pull the word under the cursor into search.
is.gd/7Onk
2
16
49
vimtips
@vimtips
17 May 2016
" y to copy to the X11 (or Windows) clipboard. " p to paste from it.
is.gd/9dkI
2
12
33
vimtips
@vimtips
16 May 2016
ga will display the ASCII, hex, and octal value of the character under the cursor.
is.gd/4xZW
21
45
vimtips
@vimtips
11 May 2016
[I (that's bracket-open, capital-i) shows lines containing the word under the cursor (via
@nvie
)
3
18
74
vimtips
@vimtips
10 May 2016
% matches brackets {} [] (), and with matchit.vim, also matches def/end, < ?php/?>, < p>/< /p>, etc.
is.gd/N4W
1
9
31
vimtips
@vimtips
9 May 2016
:40,50m30 will move lines 40 through 50 to line 30. Most visual mode commands can be used w/ line numbers.
is.gd/cCHy
1
16
44
vimtips
@vimtips
6 May 2016
In your ~/.vimrc, `set clipboard=unnamed`. Now all operations work with the OS clipboard. No need for " , "* (via
@panozzaj
)
3
59
173
Load more