nvim: init.vim: Miscellaneous cleanups
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
bdae1542b0
commit
1e5b19d740
1 changed files with 28 additions and 12 deletions
|
@ -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 <Nop>
|
|||
nnoremap <Leader>pg :PlugUpgrade<CR>
|
||||
nnoremap <Leader>pd :PlugUpdate<CR>
|
||||
nnoremap <Leader>pc :PlugClean<CR>
|
||||
" NerdTree
|
||||
nnoremap <Leader>ee :NERDTreeVCS<CR>
|
||||
nnoremap <Leader>ef :NERDTreeFind<CR>
|
||||
nnoremap <Leader>eo :NERDTreeFocus<CR>
|
||||
nnoremap <Leader>ec :NERDTreeClose<CR>
|
||||
nnoremap <Leader>et :NERDTreeToggle<CR>
|
||||
" For skim
|
||||
nnoremap <Leader>vf :Files<CR>
|
||||
nnoremap <Leader>vg :GFiles<CR>
|
||||
|
@ -193,6 +200,8 @@ nnoremap <Leader>vsh :History/<CR>
|
|||
" Use ripgrep to search for content in files
|
||||
nnoremap <Leader>/ :Rg<CR>
|
||||
nnoremap <Leader>b :ls<CR>:b<Space>
|
||||
" Undo tree
|
||||
nnoremap <Leader>u :UndotreeToggle<CR>
|
||||
" Save
|
||||
nnoremap <Leader>w <Esc>:w<CR>
|
||||
" Search and Replace
|
||||
|
@ -303,6 +312,13 @@ autocmd FileType scheme nnoremap <buffer> <Leader>re :normal mscpaF<cr>`s
|
|||
" Evaluates the entire file.
|
||||
autocmd FileType scheme nnoremap <buffer> <Leader>rf :normal msggcpG<cr>`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 = "<c-n>"
|
|||
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"
|
||||
|
|
Loading…
Reference in a new issue