""""""" 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' " Syntax for openscad files Plugin 'sirtaj/vim-openscad' " NERDtree plugin Plugin 'scrooloose/nerdtree' " NERDTree git plugin Plugin 'Xuyuanp/nerdtree-git-plugin' " Global Auto Completion Plugin 'ajh17/VimCompletesMe' " PHP Auto Completion Plugin 'shawncplus/phpcomplete.vim' " Better syntax and highlighting Plugin 'pangloss/vim-javascript' " Syntax checker Plugin 'scrooloose/syntastic' " Git command managament from nvim Plugin 'tpope/vim-fugitive' " Git plugin of fugitive plugin for view log of git Plugin 'gregsexton/gitv' " View tree of the file historic Plugin 'mbbill/undotree' " Ack search tool " Read more here : https://github.com/mileszs/ack.vim#can-i-use-ag-the-silver-searcher-with-this Plugin 'mileszs/ack.vim' " matchit "Plugin 'isa/vim-matchit' " Unicode Plugin 'chrisbra/unicode.vim' " Colorize text for exemple #fff "Plugin 'lilydjwg/colorizer' " html5 Plugin 'othree/html5.vim' " Markdon hightlighting "Plugin 'gabrielelana/vim-markdown' " Autoformat "Plugin 'Chiel92/vim-autoformat' Plugin 'maksimr/vim-jsbeautify' " rst Plugin 'marshallward/vim-restructuredtext' " 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 " NERDTree keybinding map :NERDTreeToggle autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " NERDTress File highlighting function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' endfunction call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') " Autoformat conf noremap :Autoformat let g:autoformat_autoindent = 0 let g:autoformat_retab = 0 let g:autoformat_remove_trailing_spaces = 0