Update 2024-12-31 10:47 OpenBSD/amd64-t14
This commit is contained in:
24
.vim/vimrc
24
.vim/vimrc
@@ -220,7 +220,9 @@ let g:netrw_winsize = 25
|
||||
hi! link netrwMarkFile Search
|
||||
|
||||
" TAGS FILE
|
||||
set tags=.git/tags; " Search tagfile backward recursive
|
||||
let tagsdir = trim(system("$HOME/.vim/bin/findtagsdir"))
|
||||
execute "set tags=".tagsdir."/tags"
|
||||
"set tags=.git/tags;.tags/tags; " Search tagfile backward recursive
|
||||
nnoremap gt <c-]> " Jump to tag (go tag)
|
||||
nnoremap gb <c-o> " Jump to last position (go back)
|
||||
nnoremap gh :FSHere<CR> " Jump to header file (go header)
|
||||
@@ -232,20 +234,11 @@ if has("cscope")
|
||||
set csprg=cscope
|
||||
set cst
|
||||
set cspc=3
|
||||
if filereadable("cscope.out")
|
||||
cs add cscope.out
|
||||
elseif filereadable(".git/cscope.out")
|
||||
cs add .git/cscope.out
|
||||
elseif filereadable($CSCOPEDB)
|
||||
if empty($CSCOPEDB)
|
||||
let $CSCOPEDB=tagsdir.."/cscope.out"
|
||||
endif
|
||||
if filereadable($CSCOPEDB)
|
||||
cs add $CSCOPEDB
|
||||
elseif filereadable("../.git/cscope.out")
|
||||
cs add ../.git/cscope.out
|
||||
elseif filereadable("../../.git/cscope.out")
|
||||
cs add ../../.git/cscope.out
|
||||
elseif filereadable("../../../.git/cscope.out")
|
||||
cs add ../../../.git/cscope.out
|
||||
elseif filereadable("../../../../.git/cscope.out")
|
||||
cs add ../../../../.git/cscope.out
|
||||
endif
|
||||
" 'ts' symbol: find all references to the token under cursor
|
||||
" 'tg' global: find global definition(s) of the token under cursor
|
||||
@@ -280,7 +273,6 @@ nmap em :!vim Makefile<CR><CR>
|
||||
nmap st :!smake . test<CR>
|
||||
nmap sm :!smake . <CR>
|
||||
|
||||
|
||||
let s:enablepaste = 0
|
||||
function! TogglePasteMode()
|
||||
if s:enablepaste
|
||||
@@ -318,7 +310,7 @@ xmap ga <Plug>(EasyAlign)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
|
||||
" CUSTOM: AUTO BRACKET
|
||||
inoremap {<CR> {<CR> <CR>}<up><right>
|
||||
inoremap {<cr> {<cr> <cr>}<up><end><c-h>
|
||||
|
||||
" CUSTOM: TREAT C FILES AS C, NOT C++
|
||||
augroup Programming
|
||||
|
||||
Reference in New Issue
Block a user