佳为好友

转:vim tips

创建:2012年12月27日

转:

XCode plugin: apple+.  show complete list.
:%s/fred/joe/igc           : general substitute command
:%s/\r//g                  : delete DOS Carriage Returns (^M)
:'a,'bg/fred/s/dick/joe/gc : VERY USEFUL
:s/\(.*\):\(.*\)/\2 : \1/  : reverse fields separated by :
# non-greedy matching \{-}
:%s/^.\{-}pdf/new.pdf/     : to first pdf)
:s/fred/<c-r>a/g           : substitute "fred" with contents of register "a"
:%s/^\(.*\)\n\1/\1$/       : delete duplicate lines
:help /\{-}
# multiple commands
:%s/\f\+\.gif\>/\r&\r/g | v/\.gif$/d | %s/gif/jpg/
:%s/suck\|buck/loopy/gc       : ORing
:s/__date__/\=strftime("%c")/ : insert datestring
+++++

posted on 2012-12-27 13:34 佳为好友 阅读(160) 评论(0)  编辑 收藏 引用 所属分类: Tool


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


导航

<2012年12月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

留言簿(1)

随笔分类

搜索

最新评论

评论排行榜