" TODO: automate virtualenv creation let g:python3_host_prog = $PYENV_ROOT.'/versions/py3nvim/bin/python' noremap ; : noremap : ; let mapleader = ',' let g:nvim_config_dir = expand('$HOME/.config/nvim') set list set listchars=tab:┆\ ,trail:_,extends:>,precedes:<,conceal:# set tabstop=2 set ignorecase set smartcase " mostly used for viewing docs with LanguageClient-neovim set previewheight=30 " for padding set signcolumn=yes " search experience (/, ?) " see :help 'incsearch' set nohlsearch augroup vimrc-incsearch-highlight autocmd! autocmd CmdlineEnter /,\? :set hlsearch autocmd CmdlineLeave /,\? :set nohlsearch augroup END " Required for operations modifying multiple buffers like rename across buffers. set hidden " :h persistent-undo set undofile " prevent LanguageClient-neovim + deoplete combination from showing too-large " preview window when selecting completion candidate set completeopt-=preview augroup vimrc-misc autocmd! " :h last-position-jump autocmd BufWinEnter * \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ | exe "normal! g`\"" \ | endif augroup END " save with nnoremap w nnoremap noautocmd w " changing tabs (I don't redraw screen with ) nnoremap gT nnoremap gt " Run pre-commit hooks (via overcommit) and load the result to quickfix " (requires tpope/vim-dispatch) command! Precommit compiler pre-commit | Make function! s:set_extra_whitespace_match(insert) abort let l:ignored = ["defx"] if index(l:ignored, &ft) != -1 match ExtraWhitespace // return endif if a:insert match ExtraWhitespace /\s\+\%#\@set_extra_whitespace_match(v:false) autocmd InsertEnter * call set_extra_whitespace_match(v:true) autocmd InsertLeave * call set_extra_whitespace_match(v:false) autocmd BufWinLeave * call clearmatches() " I'm not happy with this special handling but it works at least autocmd FileType defx call set_extra_whitespace_match(v:false) augroup END " dein execute 'source ' . g:nvim_config_dir . '/init-dein.vim' " colorscheme set termguicolors colorscheme tender let local_init = g:nvim_config_dir . '/init.local.vim' if filereadable(local_init) execute 'source ' . g:nvim_config_dir . '/init.local.vim' endif