Skip to content

Instantly share code, notes, and snippets.

@walbon
Created June 18, 2018 21:20
Show Gist options
  • Save walbon/a6e8f467ab049c1ecefed6c3deb3f971 to your computer and use it in GitHub Desktop.
Save walbon/a6e8f467ab049c1ecefed6c3deb3f971 to your computer and use it in GitHub Desktop.
Setting VIM variables
colo delek
syntax on
" Shortcut to rapidly toggle `set list`
nmap <leader>l :set list!<CR>
"Invisible character colors
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
"Uncomment above to see invisible characters
"set list
set listchars=tab:▸\ ,eol:¬
"Highlight trailling white spaces
highlight ExtraWhitespace ctermbg=red ctermfg=white guibg=#592959
match ExtraWhitespace /\s\+$/
"Setup for kernel devel coding
set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab
"Limit at 80 characters each line
set tw=80
set nu
"Reset delete backspace to work again
set backspace=indent,eol,start
"Cscope refresh
function Refreshcscope()
silent !~/working/scripts/cscope-find-kernel-files.sh $(pwd)
silent !mv cscope.files ~/cscope/
silent !cd ~/cscope && cscope -Rb
silent !cd ~/cscope && ctags -R
silent cs reset
redraw!
echo "cscope and ctags databases refreshed"
endfunction
map <silent> <F5> :call Refreshcscope()<cr>
cs add ~/cscope/
source ~/.vim/plugins/cscope_maps.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment