Update 2024-01-24 08:27 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2024-01-24 08:27:45 +01:00
parent 966cfbb965
commit 3fdd3d3c13
2 changed files with 29 additions and 0 deletions

View File

@ -17,6 +17,15 @@ alias exrc="vim ~/.exrc"
alias trans-en="trans -l de -s en -t de --no-ansi"
alias trans-de="trans -l en -s de -t en --no-ansi"
# taskwarrior
alias t=task
alias t-all="task rc.context:"
alias ta="task add"
alias ta-work="task rc.context:work"
alias ta-home="task rc.context:home"
alias ta-uugrn="task rc.context:uugrn"
alias ta-openbsd="task rc.context:openbsd"
# gopher bookmarks
alias fefe="sacc gopher://codevoid.de/1/fefe"
alias hn="sacc gopher://codevoid.de/1/hn"

View File

@ -104,11 +104,17 @@ set tags=./tags;/
"nnoremap gs :cs find 4 <C-R>=expand("<cword>")<CR><CR>
nnoremap gb <c-o>
"nnoremap gh :FSHere<CR>
nnoremap gs :call Cscope('0', expand('<cword>'), 0)<CR>
nnoremap gc :call Cscope('3', expand('<cword>'), 0)<CR>
nnoremap ge :call Cscope('6', expand('<cword>'), 0)<CR>
let g:fzf_tags_prompt = "Gd "
noreabbrev <expr> ts getcmdtype() == ":" && getcmdline() == 'ts' ? 'FZFTselect' : 'ts'
nmap gt <Plug>(fzf_tags)
let g:autotagTagsFile = ".tags"
let g:autotagCtagsCmd = "ectags"
@ -133,8 +139,22 @@ silent execute '!mkdir -p ~/.local/vim/backup ~/.local/vim/undo ~/.local/vim/swa
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
function! LoadCscope()
let db = findfile("cscope.out", ".;")
if (!empty(db))
let path = strpart(db, 0, match(db, "/cscope.out$"))
set nocscopeverbose " suppress 'duplicate connection' error
exe "cs add " . db . " " . path
set cscopeverbose
" else add the database pointed to by environment variable
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
endfunction
augroup mystuff
au!
au BufEnter /* call LoadCscope()
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
au BufRead,BufNewFile *.h,*.c set filetype=c.doxygen
au BufRead,BufNewFile Makefile,/usr/src/*.c,/usr/src/*.h,*.gmk setl sw=8 sts=8 noet