Practice make Perfect.
查看我的完整个人资料
假设有这样一个文件:
line 1line 2line 3...line N
想要把它翻转成这样:
line Nline N-1...line 3line 2line 1
今天看了一个TIP,可以这样做:
:g/^/m0|nohl
还可以列出上下文:
:g/<pattern>/z#.5|echo "==="|nohl
这样就把<pattern>所在行的上下两行都列出来了。
Technorati : VIM
posted by twinsant | 10:05 上午
发表评论
创建链接
<< Home
0 Comments:
发表评论
Links to this post:
创建链接
<< Home