-
Vim에서 cscope 결과를 새 Tab으로 열기카테고리 없음 2012. 6. 29. 13:15
VIM에 cscope를 설치하고 cscope_maps.vim을 연결해서 단축키를 쓰고 있습니다.
단축키를 연결해서 쓰는 것까지는 좋은데 cscope 결과를 open하면
1. current buf에서 열림
2. 상하로 split
3. 좌우로 split
가 되는 단축키는 있는데 새 Tab으로 열리는 단축키는 없더군요.
Googling을 해서 새탭으로 Open하는 방법을 아래 글에서 찾았습니다.
테스트 후에 cscope_map.vim 파일에 단축키를 아래와 같이 변경하여 쓰고 있습니다.
nmap <C-@>s :tabnew<Bar> :cs find s <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>g :tabnew<Bar> :cs find g <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>c :tabnew<Bar> :cs find c <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>t :tabnew<Bar> :cs find t <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>e :tabnew<Bar> :cs find e <C-R>=expand("<cword>")<CR><CR>
nmap <C-@>f :tabnew<Bar> :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-@>i :tabnew<Bar> :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-@>d :tabnew<Bar> :cs find d <C-R>=expand("<cword>")<CR><CR>
set timeoutlen=3000