Move vom config to ~/.config
This commit is contained in:
parent
2091418377
commit
d2feaecae1
0
.config/vim/swap/.gitignore
vendored
Normal file
0
.config/vim/swap/.gitignore
vendored
Normal file
0
.config/vim/undo/.gitignore
vendored
Normal file
0
.config/vim/undo/.gitignore
vendored
Normal file
@ -1,13 +1,21 @@
|
|||||||
|
set undodir=$XDG_DATA_HOME/vim/undo
|
||||||
|
set directory=$XDG_DATA_HOME/vim/swap
|
||||||
|
set backupdir=$XDG_DATA_HOME/vim/backup
|
||||||
|
set viewdir=$XDG_DATA_HOME/vim/view
|
||||||
|
set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo
|
||||||
|
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
||||||
|
|
||||||
|
|
||||||
" Install vim-plug
|
" Install vim-plug
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
if empty(glob('$XDG_DATA_HOME/vim/autoload/plug.vim'))
|
||||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
silent !curl -fLo $XDG_DATA_HOME/vim/autoload/plug.vim --create-dirs
|
||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Specify a directory for plugins
|
" Specify a directory for plugins
|
||||||
" Install plugins
|
" Install plugins
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('$XDG_DATA_HOME/vim/plugged')
|
||||||
|
|
||||||
Plug 'elzr/vim-json'
|
Plug 'elzr/vim-json'
|
||||||
Plug 'arcticicestudio/nord-vim'
|
Plug 'arcticicestudio/nord-vim'
|
||||||
@ -65,10 +73,6 @@ command! TrimWhitespace call s:trim_whitespace()
|
|||||||
" Highlight characters behind the 80 chars margin
|
" Highlight characters behind the 80 chars margin
|
||||||
" :au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1)
|
" :au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1)
|
||||||
|
|
||||||
" Directories for swp files
|
|
||||||
set backupdir=~/.vim/backups
|
|
||||||
set directory=~/.vim/backups
|
|
||||||
|
|
||||||
" Treat all .md files as markdown
|
" Treat all .md files as markdown
|
||||||
autocmd BufNewFile,BufRead *.md set filetype=markdown
|
autocmd BufNewFile,BufRead *.md set filetype=markdown
|
||||||
|
|
@ -16,3 +16,6 @@ export IOCAGE_COLOR=TRUE
|
|||||||
## npm config
|
## npm config
|
||||||
NPM_PACKAGES="${HOME}/.npm-packages"
|
NPM_PACKAGES="${HOME}/.npm-packages"
|
||||||
export MANPATH="${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man"
|
export MANPATH="${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man"
|
||||||
|
|
||||||
|
## Use vimrc fom XDG config home
|
||||||
|
export VIMINIT='source "$XDG_CONFIG_HOME/vim/vimrc"'
|
Loading…
Reference in New Issue
Block a user