recentpopularlog in

aries1988 : vi   51

godlygeek/tabular · GitHub
Sometimes, it's useful to line up text. Naturally, it's nicer to have the computer do this for you, since aligning things by hand quickly becomes unpleasant. While there are other plugins for aligning text, the ones I've tried are either impossibly difficult to understand and use, or too simplistic to handle complicated tasks. This plugin aims to make the easy things easy and the hard things possible, without providing an unnecessarily obtuse interface. It's still a work in progress, and criticisms are welcome.
plugin  align  tool  vi 
march 2013 by aries1988
Ranges - Vim Tips Wiki
21 line 21 :21s/old/new/g
1 first line :1s/old/new/g
$ last line :$s/old/new/g
. current line :.w single.txt
% all lines (same as 1,$) :%s/old/new/g
21,25 lines 21 to 25 inclusive :21,25s/old/new/g
21,$ lines 21 to end :21,$s/old/new/g
.,$ current line to end :.,$s/old/new/g
.+1,$ line after current line to end :.+1,$s/old/new/g
.,.+5 six lines (current to current+5 inclusive) :.,.+5s/old/new/g
.,.5 same (.5 is interpreted as .+5) :.,.5s/old/new/g
learn  howto  moi  vi 
november 2012 by aries1988
Getting Ack to Work in Vim on Ubuntu | Chris Jones
As a Magento developer I often have need to search through hundreds to thousands of files just to find a specific piece of text. The tried and true work horse for this type of operation is grep. Unfortunately, grep is a bit sluggish when it comes to a directory tree as large as Magento’s. Enter ack. Ack is fast. I dare say ack is wickedly fast.
ack  tool  vi 
october 2012 by aries1988
UNIX BASH scripting: Vim copy paste indentation issue
This happens because Vim assumes that I am actually typing and not pasting, so it indents the lines again (I already had autoindent set in my .vimrc), and this results in additional white spaces at front.
tips  paste  vi 
september 2012 by aries1988
macvim - How do I only dp or do just the lines, not the entire block in Vim diff? - Super User
do to "obtain" (and replace) a block from the other side.
dp to "put" (and replace) a block to the other side.
vimdiff  macvim  tool  vi 
september 2012 by aries1988
Changing default position of quickfix window in Vim - Stack Overflow
The second approach is to move the quickfix window to the bottom of the window layout using an auto-command.

:autocmd FileType qf wincmd J
tips  plugin  vi 
september 2012 by aries1988
Fix indentation - Vim Tips Wiki
t's possible to reformat an entire file, or a section of a file, using Vim's built-in = filter. Vim veterans often find this operator to be one of the most useful in their repertoire, but so common that it becomes second-nature and is rarely mentioned.
september 2012 by aries1988
vim大小写转换 - 郭耀今 gUf(
gU0 :从光标所在位置到行首,都变为大写
gU$ :从光标所在位置到行尾,都变为大写
gUG :从光标所在位置到文章最后一个字符,都变为大写
gU1G :从光标所在位置到文章第一个字符,都变为大写
howto  vi 
august 2012 by aries1988
integer, dimension(:, :), allocatable :: &
short_var, &
A_very_long_name_var, &
:set ve=all 使得光标可以定位到屏幕任何位置(缺省下VIM的光标只能放在行内的字符上)
gg 到文件第一行
/s+&s*$ 找以&结尾的行,&前至少一个空白字符,后0或多个空白字符
qa 记录宏到寄存器a
D 删除到行尾
78| 定位到第78列
i&<ESC> 插入&并返回到命令模式
n 查找下一个&
q 停止记录宏
10000@a 执行一万遍寄存器a中保存的命令
:set ve="" 恢复ve缺省值
fortran  howto  macro  learn  vi 
august 2012 by aries1988
vim --startuptime timefile the_file_you_want_to_edit
debug  plugin  howto  vi 
august 2012 by aries1988
Life of a Programmer Geek: Using Vim
to search for the word you are on * #
to upper case, to lower case ~
auto complete (in Insert mode) ctrl+p
to auto-indent an entire file
tips  vi 
august 2012 by aries1988
Vim tips for DOS text files | Dan Siemon
The text file type can be changed to Unix for the current buffer (file being edited) by
:set fileformat=unix
Opening a DOS text file, setting the type to be Unix and then saving the file will convert it to a Unix text file.
format  vi 
july 2012 by aries1988
Find & Replace non-printable characters in vim « ASCII value of character under cursor :%s/\%o015/\r/gc
tips  dictionary  encoding  howto  asc  vi 
april 2012 by aries1988
vim正则表达式 - 思想之地
\d 匹配阿拉伯数字,等同于[0-9]
\l 小写字母 [a-z]
\u 大写字母 [A-Z]
replace  vi 
january 2011 by aries1988
Increasing or decreasing numbers - Vim Tips Wiki
In normal mode, typing Ctrl-A will increment the next number, and typing Ctrl-X will decrement the next number. The number can be at the cursor, or to the right of the cursor (on the same line). These are the defaults for Vim, although some scripts remap these keys to perform other functions.
ctrla  numbers  increment  vi 
january 2011 by aries1988

Copy this bookmark:

to read