每行前面插入行号如下 :%s/^/\=line(".")/ 可视区域插入从1开始的编号 :'<,'>s/^/\=line('...
Sets first letter of each word to uppercase :%s/\<./\l&/g Sets first letter of each word to lowercase :%s/.*/\u& Sets first letter of each line to uppercase :%s/.*/\l& Sets first letter of each line to lowercase 读写文件 :1,10 w outfile Saves lines 1 to 10 inoutfile :1...
:%s/\<./\u&/g Sets first letter of each word to uppercase :%s/\<./\l&/g Sets first letter of each word to lowercase :%s/.*/\u& Sets first letter of each line to uppercase :%s/.*/\l& Sets first letter of each line to lowercase Read/Write files === :1,10 w outfile S...
Increment each number Vice versa Resort and deup a CSV list Delete to the end of the current line Simple text editing with Vim Swap values Put the months in order Change part of a function name in multiple occurrences Basic renumbering move titles next to url, in quotes Team names Collect...
Increment number under the cursor Ctrl+x Decrement number under cursor ggVGg? Change text to Rot13 Case Vu Lowercase line VU Uppercase line g~~ Invert case vEU Switch word to uppercase vE~ Modify word case ggguG Set all text to lowercase gggUG Set all text to uppercase :set ignorecase...
g followed by Ctrl+a for visually selected lines, increment numbers by 1 for the first line, by 2 for the second line, by 3 for the third line and so onThe Command-line mode is useful for file level operations, search and replace, changing Vim configurations, talking to external commands...
increment "*var_count" for each variable. 1449 * for "[var, var; var]" set "semicolon". 1450 * return null for an error. 1451 */ 1452 static char_u * 1453 skip_var_list( 1454 char_u *arg, 1455 int *var_count, 1456 int *semicolon) 1457 { 1458 char_u *p, *s; 1459 ...
1280 * ":doautoall": execute autocommands for each loaded buffer. 1281 */ 1282 void ex_doautoall(exarg_T *eap) 1283 { 1284 int retval; 1285 aco_save_T aco; 1286 buf_T *buf; 1287 bufref_T bufref; 1288 char_u *arg = eap->arg; ...
CTRL-A,CTRL-X : increment,decerement number under cursor 一十一、 21. 外部选择 ( a< 或 a> ) ##< … >## 内部选择 ( i< 或 i> ) <##…##> 其他{, [雷同! 一十二、 分类有些模糊,需要重新放置,并增加bookmark类 gv 启动可视模式,重新选择上一次的选择区和相同模式。 o 或 O 在选择的...
Tpope 大神写的 vim 插件都有一个特点,那就是正中 vim 的痛点。比如我常用的 surround.vim, ...