runtime packages.vim let $MYVIMDIR=split(&rtp, ',')[0] set exrc set background=dark colo chroma if exists("&cc") set cc=+1 endif set number set textwidth=80 set tabstop=2 set shiftwidth=2 set whichwrap+=<,>,h,l set notimeout set ttimeout set timeoutlen=50 set foldmethod=syntax " disables visualbell set vb t_vb= set shellcmdflag=-c set shell=/bin/zsh set timeoutlen=500 set modeline set showcmd set ignorecase smartcase set completeopt=menu,longest,preview set wildmode=list:longest,list:full set wildignore+=*.so,*.swp,*.zip,*.o set suffixes=.bak,~,.h,.info,.swp,.obj,.info,.aux,.dvi,.bbl,.out,.o,.lo,\.class set suffixes+=.pdf set wildmenu set hidden set mouse= set cursorline set undofile set undodir=~/.local/share/nvim/undo set spelllang=de " custom commands command! RC edit $MYVIMRC command! SRC source $MYVIMRC command! CD :cd %:h command! PlugEdit edit $MYVIMDIR/packages.vim command! PlugReload source $MYVIMDIR/packages.vim | PlugInstall "{{{ latex " controls filetype setting, therefore not possible to move to ftplugin let g:tex_flavor = "latex" "}}} " {{{ misc Autocommands augroup Misc au FileType mail setlocal spell au FileType man setlocal nonu augroup END augroup Cache autocmd! autocmd BufRead,BufNewFile ~/Private/* setlocal directory=. augroup END "{{{ binary editing augroup Binary au! au BufReadPre *.bin let &bin=1 au BufReadPost *.bin if &bin | %!xxd au BufReadPost *.bin set ft=xxd | endif au BufWritePre *.bin if &bin | %!xxd -r au BufWritePre *.bin endif au BufWritePost *.bin if &bin | %!xxd au BufWritePost *.bin set nomod | endif augroup END "}}} "}}} "{{{ c header gates function! s:insert_gates() let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g") execute "normal! i#ifndef " . gatename execute "normal! o#define " . gatename execute "normal! Go#endif /* " . gatename . " */" normal! kk endfunction autocmd BufNewFile *.{h,hpp} call insert_gates() "}}} " common mappings {{{ nnoremap za vnoremap . :normal . map h map j map k map l map < map > map - map + inoremap u nnoremap & :&& xnoremap & :&& nnoremap Y y$ nmap :noh:redraw! nmap :make nmap :TagbarToggle nmap :TagbarToggle nmap m :make nmap imap vmap gs :sort "}}} " Denite {{{ call denite#custom#source('file_rec', 'matchers', ['matcher_cpsm']) map gb :Denite -buffer-name=buffers buffer map gf :Denite -buffer-name=files file_rec " }}} "Git {{{ nmap gu :GitPush nmap gvc :!git svn dcommit nmap gvf :!git svn fetch " Git }}} let g:signify_vcs_list = [ 'git', 'hg' ] let g:signify_disable_by_default = 1 let g:localvimrc_whitelist='/home/crater2150/code/.*' let g:localvimrc_sandbox=0 let g:UltiSnipsEnableSnipMate = 0 " vi:foldmethod=marker sw=2