syntax on filetype plugin indent on " enable 256 colors set t_Co=256 " use 4 spaces instead of tabs set shiftwidth=4 set softtabstop=0 set expandtab set tabstop=4 set smarttab " hl tabs and other kinds of whitespace I don't want set listchars=tab:>~,nbsp:_,trail:. set list " F5 to remove trailing whitespace nnoremap \ :let _s=@/ \ :%s/\s\+$//e \ :let @/=_s \ :nohl \ :unlet _s " shows what you're typing as a command set showcmd noremap ; l noremap l k noremap k j noremap j h " makes find recursive set path+=** " displays fuzzy matches in a menu set wildmenu command! Mktags !ctags -R . " this generates tags for various programming languages " with this we can jump to a tag with ^] or g^] to find ambiguous " ones. we can also jump back by using ^t " tree view for file browser let g:netrw_liststyle=3 " line number color highlight LineNr ctermfg=darkgrey " column width set textwidth=0 "let &colorcolumn=join(range(81,999),",") let &colorcolumn=join(range(68,999),",") highlight ColorColumn ctermbg=241 " blink line when jumping to next match " by Damian Conway function! HLNext (blinktime) set invcursorline redraw exec 'sleep ' . float2nr(a:blinktime * 1000) . 'm' set invcursorline redraw endfunction nnoremap n n:call HLNext(0.4) nnoremap N N:call HLNext(0.4) " line numbers set number " snippets nnoremap ,mainc :-1read $HOME/.vim/skel/main.c5jfh nnoremap ,maingo :-1read $HOME/.vim/skel/main.go7jfh nnoremap ,modulego :-1read $HOME/.vim/skel/module.goff nnoremap ,bash :-1read $HOME/.vim/skel/bash.sh " I have a build.sh in the root folder of projects that have long " compile commands set makeprg=sh\ build.sh