Vimperator 和 Pentadactyl
更新到 Firefox4,Vimperator3 有一段时间了,有一些不习惯,不舒服 使用默认主题,左上方的 ‘Firefox’ 很扎眼 状态栏没了,网址从左下角移到右下角了 / 搜索模式经常失效 有时候 <C-Backspace> 会退出命令行状态 有时候切换回来时,Vimperator 会失效 有时候在输入框唤起输入法时,会退出插入状态 换了 Pentadactyl...
更新到 Firefox4,Vimperator3 有一段时间了,有一些不习惯,不舒服 使用默认主题,左上方的 ‘Firefox’ 很扎眼 状态栏没了,网址从左下角移到右下角了 / 搜索模式经常失效 有时候 <C-Backspace> 会退出命令行状态 有时候切换回来时,Vimperator 会失效 有时候在输入框唤起输入法时,会退出插入状态 换了 Pentadactyl...
RT @http://superuser.com/questions/22455/vim-what-is-the-ex-mode-for-batch-processing-for Ex-Mode is mostly for performing the same action on a number of files. Say you have 25 .html files all with: <a href="/home.html"> ... Instead of opening each one of those, you could use Ex-mode to change it all to index.html: vim -E -s bob.html <<-EOF %substitute/home.html/index.html/ update quit EOF PS @http://tinyurl.com/2f7dpgg > also, make sure that last "eof" begins at the first column. If it > doesn't, the "here doc" won't recegnize it. You should really quote some relevant text from the previous post… Also, the “eof” marker in a heredoc does NOT have to start in the first column, if you use this syntax, leading tabs will be stripped: some_command <<-eof blah blah blah eof Note the “-e” after the “«”… Kevin
#!/usr/bin/env sh # # =================================== # %s/""$\n\|"$\n^"\|$\n^$\|^#.*$\n//g # =================================== # 1. s/""$\n//g 删除空字符串 # 2. s/"$\n^"//g 多行合并为一行 # 3. s/$\n^$//g 删除空行 # 4. s/^#.*$//g 删除注释 # # ================= # %g/^msgstr/-1join # ================= # 合并 msgid 和 msgstr 到一行 # # ==================================================== # %s/^msgid "\(.\+\)" msgstr "\?\([^"]*\)"\?$/\1\t\2/g # ==================================================== # 用制表符 <TAB> 格式化,并删除字符串前后的双引号 # # ======================================================= # 1s/^msgid msgstr ".*$/msgid\tmsgstr\tmsgstr in french / # ======================================================= # 更新第一行,作为标题栏 # # =========== # U s e a g e # =========== # $ chmod u+x po2xls # $ po2xls *.po # for file in "$@";...
RT @http://blah.blogsome.com/2007/07/29/p44/ 最近纠结在是否要重拾 Emacs。诱因是 [非著名程序员] (http://julien.danjou.info/blog/2010.html#Entering the Emacs world) 改用 Emacs 了。 用 VIM 已经不少年了,最开始的两年只是 ssh 登上服务器后用 VIM 作一些简单的编辑, 后来转到 Linux 桌面后的几年开始使用 VIM 作为日常编辑开发工具。如果把 VIM 用户分 为新手、高手、专家、作者四个级别的话,我怎么也应该算是高手级别了。...