diff options
author | yushyin <yushyin@saga> | 2015-07-30 23:07:17 +0200 |
---|---|---|
committer | yushyin <yushyin@saga> | 2015-07-30 23:37:33 +0200 |
commit | 99f1c17274bcea036aca040642bb8377e95f6fcd (patch) | |
tree | beb1f9e3969647fa099834987e8510af037ba312 /vim/ftplugin/c.vim | |
download | dotfiles-99f1c17274bcea036aca040642bb8377e95f6fcd.tar.gz dotfiles-99f1c17274bcea036aca040642bb8377e95f6fcd.tar.xz |
Add vim config
Diffstat (limited to 'vim/ftplugin/c.vim')
-rw-r--r-- | vim/ftplugin/c.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vim/ftplugin/c.vim b/vim/ftplugin/c.vim new file mode 100644 index 0000000..f3f7198 --- /dev/null +++ b/vim/ftplugin/c.vim @@ -0,0 +1,15 @@ +if has('cscope') + if filereadable("cscope.out") + cs add cscope.out + endif + nnoremap [cscope] <Nop> + nmap <C-\> [cscope] + nmap [cscope]s :cs find s <C-R>=expand("<cword>")<CR><CR> + nmap [cscope]g :cs find g <C-R>=expand("<cword>")<CR><CR> + nmap [cscope]c :cs find c <C-R>=expand("<cword>")<CR><CR> + nmap [cscope]t :cs find t <C-R>=expand("<cword>")<CR><CR> + nmap [cscope]e :cs find e <C-R>=expand("<cword>")<CR><CR> + nmap [cscope]f :cs find f <C-R>=expand("<cfile>")<CR><CR> + nmap [cscope]i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR> + nmap [cscope]d :cs find d <C-R>=expand("<cword>")<CR><CR> +endif |