aboutsummaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-09-07 22:47:57 +0200
committerNeodarZ <neodarz@neodarz.net>2017-09-07 22:47:57 +0200
commit4c47b226a0956d8dde9e2bb9f2daf39ddcc4519b (patch)
treea3bc1c29d831a8fe5c84b762c1a5a9315ce70cb7 /nvim
parente8084024390440c7a956fcd465f67c1db61ae606 (diff)
downloaddotfiles_ascii-4c47b226a0956d8dde9e2bb9f2daf39ddcc4519b.tar.xz
dotfiles_ascii-4c47b226a0956d8dde9e2bb9f2daf39ddcc4519b.zip
Add some plugins
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/init.vim32
1 files changed, 31 insertions, 1 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
index 1bc22c8..73562ff 100644
--- a/nvim/.config/nvim/init.vim
+++ b/nvim/.config/nvim/init.vim
@@ -16,7 +16,7 @@ Plugin 'VundleVim/Vundle.vim'
" Neomake build tool (mapped below to <c-b>)
Plugin 'benekastah/neomake'
" Autocomplete for python
-"Plugin 'davidhalter/jedi-vim'
+Plugin 'davidhalter/jedi-vim'
" Remove extraneous whitespace when edit mode is exited
"Plugin 'thirtythreeforty/lessspace.vim'
@@ -33,8 +33,15 @@ 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'
+
" After all plugins...
call vundle#end()
filetype plugin indent on
@@ -121,4 +128,27 @@ nnoremap <C-b> :w<cr>:Neomake<cr>
autocmd BufNewFile,BufRead *.tex,*.bib noremap <buffer> <C-b> :w<cr>:new<bar>r !make<cr>:setlocal buftype=nofile<cr>:setlocal bufhidden=hide<cr>:setlocal noswapfile<cr>
autocmd BufNewFile,BufRead *.tex,*.bib imap <buffer> <C-b> <Esc><C-b>
+" NERDTree keybinding
+map <C-n> :NERDTreeToggle<CR>
+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')