From 53d39a584c847d84c6f9ba7ec1303442503a7329 Mon Sep 17 00:00:00 2001 From: neodarz Date: Thu, 7 Sep 2017 22:17:49 +0200 Subject: Add nvim conf --- nvim/.config/nvim/init.vim | 124 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 nvim/.config/nvim/init.vim (limited to 'nvim/.config') diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim new file mode 100644 index 0000000..1bc22c8 --- /dev/null +++ b/nvim/.config/nvim/init.vim @@ -0,0 +1,124 @@ +""""""" Plugin management stuff """"""" +set nocompatible +filetype off + +set rtp+=~/.config/nvim/bundle/Vundle.vim +call vundle#begin('~/.config/nvim/bundle') + +Plugin 'VundleVim/Vundle.vim' + +" Custom plugins... +" EasyMotion - Allows (b|e) to jump to (b)eginning or (end) +" of words. +"Plugin 'easymotion/vim-easymotion' +" Ctrl-P - Fuzzy file search +"Plugin 'kien/ctrlp.vim' +" Neomake build tool (mapped below to ) +Plugin 'benekastah/neomake' +" Autocomplete for python +"Plugin 'davidhalter/jedi-vim' +" Remove extraneous whitespace when edit mode is exited +"Plugin 'thirtythreeforty/lessspace.vim' + +" Screen splitter. Cool, but doesn't work with nvim. +"Plugin 'ervandew/screen' + +" LaTeX editing +Plugin 'LaTeX-Box-Team/LaTeX-Box' + +" Status bar mods +Plugin 'bling/vim-airline' +Plugin 'airblade/vim-gitgutter' + +" Tab completion +Plugin 'ervandew/supertab' + +Plugin 'sirtaj/vim-openscad' + +" After all plugins... +call vundle#end() +filetype plugin indent on + +""""""" Jedi-VIM """"""" +" Don't mess up undo history +"let g:jedi#show_call_signatures = "0" + + +""""""" SuperTab configuration """"""" +"let g:SuperTabDefaultCompletionType = "" +function! Completefunc(findstart, base) + return "\\" +endfunction + +"call SuperTabChain(Completefunc, '') + +"let g:SuperTabCompletionContexts = ['g:ContextText2'] + + +""""""" General coding stuff """"""" +" Highlight 80th column +set colorcolumn=80 +" Always show status bar +set laststatus=2 +" Let plugins show effects after 500ms, not 4s +set updatetime=500 +" Disable mouse click to go to position +set mouse-=a +" Don't let autocomplete affect usual typing habits +set completeopt=menuone,preview,noinsert +" Let vim-gitgutter do its thing on large files +let g:gitgutter_max_signs=10000 + +" If your terminal's background is white (light theme), uncomment the following +" to make EasyMotion's cues much easier to read. +" hi link EasyMotionTarget String +" hi link EasyMotionShade Comment +" hi link EasyMotionTarget2First String +" hi link EasyMotionTarget2Second Statement + + +""""""" Python stuff """"""" +syntax enable +set number showmatch +set shiftwidth=4 tabstop=4 softtabstop=4 expandtab autoindent +let python_highlight_all = 1 + + +""""""" Keybindings """"""" +" Set up leaders +let mapleader="," +let maplocalleader="\\" + +" Mac OS X option-left / right +noremap â b +noremap æ e +inoremap â b +inoremap æ e +" Note - this required binding in preferences (Cmd-,) option+backspace to +" escape+z. +" Why this one is complicated - at end of line moves cursor by one +" character, which means a trailing character could be left. +inoremap ú col('.')>1 ? 'Tdb' : 'Tdb' +" Requires binding option+forward delete to escape +inoremap ø dw + +" Linux / windows ctrl+backspace ctrl+delete +" Note that ctrl+backspace doesn't work in Linux, so ctrl+\ is also available +imap ú +imap ú +imap ø + +" Arrow keys up/down move visually up and down rather than by whole lines. In +" other words, wrapped lines will take longer to scroll through, but better +" control in long bodies of text. +" NOTE - Disabled since w|e|b works well with easymotion +"noremap gk +"noremap gj + +" Neomake and other build commands (ctrl-b) +nnoremap :w:Neomake + +autocmd BufNewFile,BufRead *.tex,*.bib noremap :w:newr !make:setlocal buftype=nofile:setlocal bufhidden=hide:setlocal noswapfile +autocmd BufNewFile,BufRead *.tex,*.bib imap + + -- cgit v1.2.1