summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bash_profile1
-rw-r--r--.bashrc2
-rw-r--r--.config/vim/vimrc (renamed from .vim/vimrc)21
3 files changed, 20 insertions, 4 deletions
diff --git a/.bash_profile b/.bash_profile
index 2c2d5a5..8a0217a 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -29,6 +29,7 @@ export CM_LAUNCHER=rofi
export CM_SELECTIONS=clipboard
export CM_DIR=/tmp
export PF_INFO="ascii title os kernel uptime pkgs memory"
+export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.lua" | so $MYVIMRC'
export LESS_TERMCAP_mb=$'\E[1;31m'
export LESS_TERMCAP_md=$'\E[1;31m'
diff --git a/.bashrc b/.bashrc
index 83d9581..0902233 100644
--- a/.bashrc
+++ b/.bashrc
@@ -41,7 +41,7 @@ alias cs='config status'
alias clg="config log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
alias bashrc='vim ~/.bashrc'
-alias vimrc='vim ~/.vim/vimrc'
+alias vimrc='vim $XDG_CONFIG_HOME/vim/vimrc'
alias nvimrc='cd $XDG_CONFIG_HOME/nvim;nvim'
alias i3config='vim $XDG_CONFIG_HOME/i3/config'
alias startup='vim $XDG_CONFIG_HOME/i3/init'
diff --git a/.vim/vimrc b/.config/vim/vimrc
index f174b07..0984fc1 100644
--- a/.vim/vimrc
+++ b/.config/vim/vimrc
@@ -1,8 +1,23 @@
-call plug#begin('~/.vim/plugged')
+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 viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+set viminfofile=$XDG_CACHE_HOME/vim/viminfo
+set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set undofile
+
+call plug#begin('~/.config/vim/plugged')
Plug 'romgrk/doom-one.vim'
- " Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
- " Plug 'tpope/vim-repeat'
Plug 'tpope/vim-commentary'
call plug#end()