2种xterm下,强制vim黑背景的方法。 星期二, 03月 3rd, 2009
☎ g xtermcontrol .vimrc
” :!xtermcontrol –bg=black
☎ dog v
xbg=`xtermcontrol –get-bg`
xtermcontrol –bg=black
vim $*
xtermcontrol –bg=$xbg
t_Sb设置无效呢。t_AB也是。
☎ g xtermcontrol .vimrc
” :!xtermcontrol –bg=black
☎ dog v
xbg=`xtermcontrol –get-bg`
xtermcontrol –bg=black
vim $*
xtermcontrol –bg=$xbg
t_Sb设置无效呢。t_AB也是。
a double click to jump to the tag under the cursor:
:map :exe “tag “. expand(”")
:map <X1Mouse> <C-O>
:map <X2Mouse> <C-I>
Map the X1 and X2 buttons to go forwards and backwards in the jump list
vim识别:^[ \x1b , \x7
echo识别:\e \x1b , \a
☎ tail -n 6 ~/.vimrc
:source $VIMRUNTIME/menu.vim
:set wildmenu
:set cpo-=<
:set wcm=
:map :emenu
:map :popu Cscope
☎ cat ~/.vim/plugincscope-menu-exp.vim
" Add_Cscope_Menu
" Adds a cscope menu
" All the commands work on the word that is under the cursor
"function! s:Add_CScope_Menu(menu_clear)
function Add_CScope_Menu(menu_clear)
if (a:menu_clear)
silent! unmenu &Cscope
silent! unmenu! &Cscope
menu 19.405 &Cscope.查找调用本函数的函数 :cs find c =expand("")
menu 19.406 &Cscope.查找本函数调用的函数 :cs find d =expand("")
menu 19.407 &Cscope.查找egrep模式 :cs find e =expand("")
menu 19.408 &Cscope.查找并打开文件 :cs find f =expand("")
menu 19.409 &Cscope.查找函数、宏、枚举等定义的位置 :cs find g =expand("")
menu 19.410 &Cscope.查找包含本文件的#including文件 :cs find i =expand("")
menu 19.411 &Cscope.查找C语言符号 :cs find s =expand("")
menu 19.412 &Cscope.查找指定的字符串 :cs find t =expand("")
endif
endfunction
autocmd BufEnter * call Add_CScope_Menu(1)

才发现,居然less可以识别fvwm的配置文件为[fvwm],直接vi却出[conf]。
☎ type less
less 已被别名为“/usr/share/vim/vim71/macros/less.sh”
文件任意位置,加入
# vim: filetype=fvwm
less 都照本宣科,识别为[fvwm],否则识别为[conf]。
vim 就是不认。都是[conf]。
/usr/share/vim/vim71/filetype.vim里面的那判断看了,没识别的文件,头5行,看到有#注释的,就认成conf。修改到只留下面一行相关的,都没用。放~/.vimrc也是。
au BufNewFile,BufRead */.fvwm/f.*,*/.fvwm/config,*fvwmrc call s:StarSetf('fvwm')
☎ g ‘^[^"].*status’ .vimrc
set laststatus=2
set statusline=
set statusline+=%-30.60f
set statusline+=%10.{&encoding}
set statusline+=\ %5.l/%L行\ %10.p%%\ %10.y
谁知道为什么~/.fvwm的文件,不能认成fvwm。
☎ g fvwm .vimrc
au BufNewFile,BufRead ~/.fvwm/f.* setf fvwm
“au BufNewFile,BufRead f.*,config so /usr/share/vim/vim71/syntax/fvwm.vim
~/.fvwm/f.action 老不能使用\x切换注视。一直奇怪。今天看半天,在~/.vim/下面加filetye.vim和script.vim强制设置都不行。最后,在/usr/share/vim/vim71/filetype.vim里面强制都不行。因为不会看当前的filetype。结果,yaoms说的用:set看。以前也看过,没发现fvwm的字眼。今天一行一行看,原来filetype是conf和privoxy,天,原来就没识别为fvwm的文件类型。到/usr/share/vim/vim71/filetype.vim里面,找到privoxy。看到被暗算了。
” Privoxy actions file
“au BufNewFile,BufRead *.action setf privoxy
注释点了事。虽然filetype都还是conf。至少EnhancedCommentify.vim可以统一调整。
就是奇怪,为什么不是识别为fvwm。其判断在前面的行啊。
637 au BufNewFile,BufRead auto.master setf conf
2258 au BufNewFile,BufRead,StdinReadPost *
\ if !did_filetype() && expand(”") !~ g:ft_ignore_pat
\ && (getline(1) =~ ‘^#’ || getline(2) =~ ‘^#’ || getline(3) =~ ‘^#’
\ || getline(4) =~ ‘^#’ || getline(5) =~ ‘^#’) |
\ setf conf |
\ endif
2176 au BufNewFile,BufRead */.fvwm/* call s:StarSetf(’fvwm‘)
” wordpress
:inoremap <leader>wpc <code></code><ESC>bba
:inoremap <leader>wpb <blockquote></blockquote><ESC>bba
老不记得这写法。
下次试试vmap。
:noremap <leader>sed :s/</\</g<CR>:s/>/\>/g<CR>
Terminal使用vim,也退出乱码。
☎ sed -i ’s/\<终端$/\\\ 终端\\\ /’ ~/.config/Terminal/terminalrc
不需要ruby支持。试试。List太多了。4xx文章。Open 436了。
test code