set nocompatible " mouse support set mouse= " real backspace, please set backspace=indent,eol,start " disable welcome screen set shm+=I " don't complain about $( ) let g:is_posix=1 set number set cursorline "set cursorline set scrolloff=3 set spelllang=de,en syntax on filetype plugin on set omnifunc=syntaxcomplete#Complete " colors set t_Co=257 set background=dark colorscheme candle-grey-transparent hi CursorLineNr ctermbg=NONE ctermfg=30 cterm=NONE hi CursorLine ctermbg=NONE ctermfg=NONE cterm=NONE " SEARCH set hlsearch set ignorecase set smartcase " SPACES (TABS) set tabstop=8 set shiftwidth=4 let &softtabstop=&shiftwidth set expandtab set smarttab set textwidth=72 " set colorcolumn=72 set formatprg=par\ -w72q set list set listchars=tab:>_,trail:> set fillchars=vert:\|,eob:\ " " autocomplete " set wildmenu " set wildmode=longest:full,full " " function! CleverTab() " if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' " return "\" " else " return "\" " endif " endfunction " inoremap =CleverTab() function! s:build_quickfix_list(lines) call setqflist(map(copy(a:lines), '{ "filename": v:val, "lnum": 1 }')) copen cc endfunction let g:fzf_layout = { 'down': '60%' } nnoremap :Files nnoremap :Buffers let g:fzf_action = { \ 'ctrl-t': 'tab split', \ 'ctrl-x': 'vsplit' } let g:fzf_vim = {} let g:fzf_vim.tags_command = 'ksh -ic mktags' command! MyFiles call fzf#run(fzf#wrap({ \ 'source': 'list-myfiles', \ 'sink': 'edit', \ 'options': ['--multi', '--pointer', '→', '--marker', '♡', '--preview', 'cat {}'] \ })) let g:mapleader = "," nnoremap f :Files nnoremap b :Buffers nnoremap l :Lines nnoremap t :Tags nnoremap m :MyFiles nnoremap h :History let g:tagbar_ctags_bin = "ectags" noremap tt :TagbarToggle " TAGS FILE set tags=./tags;/ "nnoremap gt :cs find 1 =expand("") "nnoremap gs :cs find 4 =expand("") nnoremap gb "nnoremap gh :FSHere let g:fzf_tags_prompt = "Gd " noreabbrev ts getcmdtype() == ":" && getcmdline() == 'ts' ? 'FZFTselect' : 'ts' nmap gt (fzf_tags) let g:autotagTagsFile = ".tags" let g:autotagCtagsCmd = "ectags" " HIGHLIGHT SPECIAL WORDS match ErrorMsg '\(TODO:\|FIXME\|XXX\|workaround\|WTF\|: error:.*\|\s\+$\| \+\ze\t\)' " DIFF set formatoptions=crolj " TEMPORARY FILES set undofile set undodir=~/.local/vim/undo// set backup set backupcopy=yes set backupdir=~/.local/vim/backup// set directory=~/.local/vim/swapfiles// silent execute '!mkdir -p ~/.local/vim/backup ~/.local/vim/undo ~/.local/vim/swapfiles' " PLUGIN: EASY ALIGN xmap ga (EasyAlign) nmap ga (EasyAlign) augroup mystuff au! 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 au BufWritePost vimrc so ~/.vim/vimrc augroup end