diff --git a/nvim/init.vim b/nvim/init.vim index ea29b48..9ea3822 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -18,8 +18,6 @@ Plug 'bling/vim-airline' Plug 'airblade/vim-gitgutter' " Manage Project sessions Plug 'thaerkh/vim-workspace' -" Explore filesystem -Plug 'scrooloose/nerdtree' " Commenter Plug 'scrooloose/nerdcommenter' " Theme @@ -74,15 +72,24 @@ Plug 'vim-erlang/vim-erlang-compiler' " Miscellaneous Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' -Plug 'editorconfig/editorconfig-vim' Plug 'tpope/vim-eunuch' +Plug 'tpope/vim-sleuth' +Plug 'tpope/vim-vinegar' +Plug 'editorconfig/editorconfig-vim' Plug 'vim-utils/vim-man' Plug 'unblevable/quick-scope' Plug 'igankevich/mesonic' Plug 'rhysd/vim-clang-format', { 'for': [ 'c', 'cpp'] } -Plug 'adelarsq/vim-matchit' Plug 'stefandtw/quickfix-reflector.vim' Plug 'yuttie/comfortable-motion.vim' +Plug 'lifecrisis/vim-difforig' +Plug 'dag/vim-fish' +Plug 'pbrisbin/vim-syntax-shakespeare' +Plug 'zenzike/vim-haskell-unicode' +Plug 'lifepillar/pgsql.vim' +Plug 'purescript-contrib/purescript-vim' +Plug 'mbbill/undotree' +Plug 'airblade/vim-rooter' " Initialize plugin system call plug#end() @@ -102,7 +109,6 @@ set exrc " Allow loading local .nvimrc files set secure " Disallow use of autocmd, shell and write in local rc set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets. -set showmode " Show current mode. set ruler " Show the line and column numbers of the cursor. set number " Show the line numbers on the left side. set formatoptions+=o " Continue comment marker in new lines. @@ -118,11 +124,18 @@ set noerrorbells " No beeps. set modeline " Enable modeline. set linespace=0 " Set line-spacing to minimum. set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) +set noshowmode " Because of neovim's cursor shape set splitbelow " Horizontal split below current. set splitright " Vertical split to right of current. set nobackup " no backup files set nowritebackup " only in case you don't want a backup file while editing set noswapfile " no swap files +set foldmethod=syntax " Create folds based on files syntax +set nofoldenable " Open folds by default + +" Wild menu +set wildmenu +set wildmode=list:longest,full set wildoptions=pum set pumblend=30 @@ -172,12 +185,6 @@ nnoremap Q nnoremap pg :PlugUpgrade nnoremap pd :PlugUpdate nnoremap pc :PlugClean -" NerdTree -nnoremap ee :NERDTreeVCS -nnoremap ef :NERDTreeFind -nnoremap eo :NERDTreeFocus -nnoremap ec :NERDTreeClose -nnoremap et :NERDTreeToggle " For skim nnoremap vf :Files nnoremap vg :GFiles @@ -193,6 +200,8 @@ nnoremap vsh :History/ " Use ripgrep to search for content in files nnoremap / :Rg nnoremap b :ls:b +" Undo tree +nnoremap u :UndotreeToggle " Save nnoremap w :w " Search and Replace @@ -303,6 +312,13 @@ autocmd FileType scheme nnoremap re :normal mscpaF`s " Evaluates the entire file. autocmd FileType scheme nnoremap rf :normal msggcpG`s +" Toggles search highlighting off/on according to current mode. Source: http://blog.sanctum.geek.nz/vim-search-highlighting/ +augroup ToggleSearchHighlighting + autocmd! + autocmd InsertEnter * setlocal nohlsearch + autocmd InsertLeave * setlocal hlsearch +augroup END + let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` @@ -404,7 +420,7 @@ let g:SuperTabDefaultCompletionType = "" let g:workspace_session_directory = $HOME . '/.vim/session/' let g:workspace_undodir = $HOME . '/.vim/undodir' let g:workspace_autosave = 0 -let g:workspace_autosave_ignore = ['gitcommit', 'qf', 'nerdtree', 'tagbar'] +let g:workspace_autosave_ignore = ['gitcommit', 'qf', 'tagbar'] " For comfortable motion let g:comfortable_motion_scroll_down_key = "j" let g:comfortable_motion_scroll_up_key = "k"