From 6727d0dbd55f5f15584b08b4b588f0436edc2ebd Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 19 Jul 2018 14:43:53 +0200 Subject: nvim: Reorganize things MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nvim/init.vim | 52 ++++++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 6a1d295..2a81784 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -4,9 +4,13 @@ call plug#begin(expand('$XDG_CONFIG_HOME/nvim/plugs')) -Plug 'chriskempson/base16-vim' " Base16 colorschemes -Plug 'itchyny/lightline.vim' " Modeline replacement +" Base16 colorschemes +Plug 'chriskempson/base16-vim' +" Modeline replacement +Plug 'itchyny/lightline.vim' + +" Better syntax highlighting Plug 'rust-lang/rust.vim' Plug 'tpope/vim-git' @@ -26,14 +30,6 @@ let g:lightline = { \ } -""" -" Builtin things -" - -" List of vim syntaxes to highlight in rST code blocks -let g:rst_syntax_code_list = ['vim', 'c', 'cpp', 'python', 'sh'] - - """ " NVim settings " @@ -79,6 +75,20 @@ autocmd InsertLeave * match ExtraWhitespace /\s\+$/ autocmd BufWinLeave * call clearmatches() +""" +" Filetypes +" +augroup filetypedetect + autocmd BufRead,BufNewFile *mutt-* setfiletype mail + autocmd BufRead,BufNewFile *.h setfiletype c +augroup END + + +" Horrible hack to work-around weird corrupted lines on window resize +" https://github.com/neovim/neovim/issues/7861 +autocmd VimResized * redraw! + + """ " Mappings @@ -97,30 +107,8 @@ vmap gk nmap gj nmap gk - -""" -" CtrlP -" - -let g:ctrlp_extensions = ['tag', 'buffertag', 'dir', 'undo', 'line', - \ 'changes', 'mixed', 'bookmarkdir'] - noremap pf :Denite file_rec noremap pm :Denite file_mru noremap pb :Denite buffer noremap px :Denite buffer file_mru file_rec noremap pg :Denite grep - - -""" -" Filetypes -" -augroup filetypedetect - autocmd BufRead,BufNewFile *mutt-* setfiletype mail - autocmd BufRead,BufNewFile *.h setfiletype c -augroup END - - -" Horrible hack to work-around weird corrupted lines on window resize -" https://github.com/neovim/neovim/issues/7861 -autocmd VimResized * redraw! -- cgit v1.2.3-70-g09d2