summaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim')
-rw-r--r--nvim/init.vim23
1 files changed, 20 insertions, 3 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
index 42fe34d..812bf3e 100644
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -1,3 +1,20 @@
+set runtimepath^=$XDG_CONFIG_HOME/vim
+set runtimepath+=$XDG_DATA_HOME/vim
+set runtimepath+=$XDG_CONFIG_HOME/vim/after
+
+set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
+set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
+
+let g:netrw_home = $XDG_DATA_HOME."/vim"
+call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
+
+set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif
+
" vimplugs {{{
call plug#begin('~/.config/nvim/plugged')
" colorschemes {{{
@@ -45,7 +62,7 @@ set showmatch " Highlight matching brace
set number
set relativenumber
-colorscheme 256-grayvim
+colorscheme Dark2
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
@@ -190,7 +207,7 @@ autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" custom augroup {{{
augroup custom
autocmd!
- au BufEnter *.tex :LLPStartPreview
+ "au BufEnter *.tex :LLPStartPreview
au BufEnter *.md :set textwidth=80
au BufEnter *.ms :set textwidth=80
"au BufEnter *.c :colo DevC++
@@ -200,7 +217,7 @@ augroup custom
"au BufEnter *.cpp :colo DevC++
"au BufEnter *.hpp :colo DevC++
au BufWritePost init.vim :source %
- au BufWritePost *.tex :make
+ "au BufWritePost *.tex :make
au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd
au BufWritePost .Xresources :!xrdb ~/.Xresources
au BufWritePost .gitignore :!git add .gitignore