虽然同事一般都用SecureCRT,不过我机器上SecureCRT在UTF-8编辑设置下不正常,于是还是换回putty。
支持滚屏、鼠标的配置的关键之处是:.bash_profile中export TERM=xterm,.screenrc中termcapinfo xterm ti@:te@,.vimrc中set ttymouse=xterm2。
另外,vim+cscope确实好用。下面是cscope方面的设置:
其他的就懒得贴了。
支持滚屏、鼠标的配置的关键之处是:.bash_profile中export TERM=xterm,.screenrc中termcapinfo xterm ti@:te@,.vimrc中set ttymouse=xterm2。
另外,vim+cscope确实好用。下面是cscope方面的设置:
- if has("cscope")
- set nocsverb
- if $CSCOPE_DB != ""
- cs add $CSCOPE_DB
- let g:CScopeOut=$CSCOPE_DB
- elseif filereadable("cscope.out")
- cs add cscope.out
- let g:CScopeOut="cscope.out"
- elseif filereadable("../cscope.out")
- cs add ../cscope.out ..
- let g:CScopeOut="../cscope.out"
- elseif filereadable("../../cscope.out")
- cs add ../../cscope.out ../..
- let g:CScopeOut="../../cscope.out"
- elseif filereadable("../../../cscope.out")
- cs add ../../../cscope.out ../../..
- let g:CScopeOut="../../../cscope.out"
- elseif filereadable("../../../../cscope.out")
- cs add ../../../../cscope.out ../../../..
- let g:CScopeOut="../../../../cscope.out"
- elseif filereadable("../../../../../cscope.out")
- cs add ../../../../../cscope.out ../../../../..
- let g:CScopeOut="../../../../../cscope.out"
- elseif filereadable("../../../../../../cscope.out")
- cs add ../../../../../../cscope.out ../../../../../..
- let g:CScopeOut="../../../../../../cscope.out"
- else
- let g:CScopeOut=""
- endif
- set csverb
- nmap <C-_> :cs find 3 <C-R>=expand("<cword>")<CR><CR>
- nmap g<C-]> :cstag <C-R>=expand("<cword>")<CR><CR>
- nmap g<C-/> :cs find 0 <C-R>=expand("<cword>")<CR><CR>
- vmap g<C-/> "zy:cs find 4 <C-R>z<CR>
- function! Myadd_csup(findpath)
- if g:CScopeOut == ""
- return
- endif
- if cscope_connection(4, g:CScopeOut, substitute(g:CScopeOut, "/[^/]*$", "", "")) || cscope_connection(4, g:CScopeOut)
- exec "cs kill " . g:CScopeOut
- if a:findpath == ""
- if g:findpath != ""
- let s:findpath = g:findpath
- else
- let s:findpath = substitute(g:CScopeOut, "/[^/]*$", "", "")
- endif
- else
- let s:findpath = a:findpath
- endif
- echo "Finding.."
- let s:temp=system("find " . s:findpath . " -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.cc' >" . substitute(g:CScopeOut, "out$", "files", ""))
- echo "Sorting.."
- let s:temp=system("~/.bin/rmdupcsfile " . substitute(g:CScopeOut, "out$", "files", ""))
- echo "Building.."
- let s:temp=system("cscope -b -i " . substitute(g:CScopeOut, "out$", "files", "") . " -f " . g:CScopeOut)
- exec "cs add " . g:CScopeOut . " " . substitute(g:CScopeOut, "/[^/]*$", "", "")
- else
- echo "Cscope update failed"
- endif
- endfunction
- command! Upcs call Myadd_csup("")
- endif
其他的就懒得贴了。