diff options
-rw-r--r-- | .vim/.gitignore | 3 | ||||
-rw-r--r-- | .vim/filetype.vim | 3 | ||||
-rw-r--r-- | .vim/plugin/airline.plug (renamed from .vim/plugins/airline.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/ale.vim (renamed from .vim/plugins/ale.vim) | 0 | ||||
-rw-r--r-- | .vim/plugin/asyncrun.plug (renamed from .vim/plugins/asyncrun.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/easymotion.plug (renamed from .vim/plugins/easymotion.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/fugitive.plug (renamed from .vim/plugins/fugitive.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/general.plug (renamed from .vim/plugins/general.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/godot.vim (renamed from .vim/plugins/godot.vim) | 0 | ||||
-rw-r--r-- | .vim/plugin/gutentags.plug (renamed from .vim/plugins/gutentags.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/init.vim (renamed from .vim/plugins/init.vim) | 4 | ||||
-rw-r--r-- | .vim/plugin/lang.plug (renamed from .vim/plugins/lang.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/leaderf.vim (renamed from .vim/plugins/leaderf.vim) | 0 | ||||
-rw-r--r-- | .vim/plugin/ledger.plug (renamed from .vim/plugins/ledger.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/lsp.plug (renamed from .vim/plugins/lsp.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/markdown.plug (renamed from .vim/plugins/markdown.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/misc.plug (renamed from .vim/plugins/misc.plug) | 2 | ||||
-rw-r--r-- | .vim/plugin/slime.plug (renamed from .vim/plugins/slime.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/tex.plug (renamed from .vim/plugins/tex.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/vimspector.plug (renamed from .vim/plugins/vimspector.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/vimwiki.plug (renamed from .vim/plugins/vimwiki.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/vista.plug (renamed from .vim/plugins/vista.plug) | 0 | ||||
-rw-r--r-- | .vim/plugin/youcompleteme.vim (renamed from .vim/plugins/youcompleteme.vim) | 0 | ||||
-rw-r--r-- | .vim/plugins/startify.plug | 1 | ||||
-rw-r--r-- | .vimrc (renamed from .vim/init.vim) | 4 | ||||
-rwxr-xr-x | bootstrap.sh | 33 |
26 files changed, 40 insertions, 10 deletions
diff --git a/.vim/.gitignore b/.vim/.gitignore new file mode 100644 index 0000000..3c1968e --- /dev/null +++ b/.vim/.gitignore @@ -0,0 +1,3 @@ +plugged +autoload +.swp diff --git a/.vim/filetype.vim b/.vim/filetype.vim new file mode 100644 index 0000000..4d7e2c5 --- /dev/null +++ b/.vim/filetype.vim @@ -0,0 +1,3 @@ +augroup filetypedetect + autocmd BufRead,BufNewFile *mutt-* setfiletype mail +augroup end diff --git a/.vim/plugins/airline.plug b/.vim/plugin/airline.plug index a1c1b94..a1c1b94 100644 --- a/.vim/plugins/airline.plug +++ b/.vim/plugin/airline.plug diff --git a/.vim/plugins/ale.vim b/.vim/plugin/ale.vim index 105bfa8..105bfa8 100644 --- a/.vim/plugins/ale.vim +++ b/.vim/plugin/ale.vim diff --git a/.vim/plugins/asyncrun.plug b/.vim/plugin/asyncrun.plug index bed9473..bed9473 100644 --- a/.vim/plugins/asyncrun.plug +++ b/.vim/plugin/asyncrun.plug diff --git a/.vim/plugins/easymotion.plug b/.vim/plugin/easymotion.plug index ce87f12..ce87f12 100644 --- a/.vim/plugins/easymotion.plug +++ b/.vim/plugin/easymotion.plug diff --git a/.vim/plugins/fugitive.plug b/.vim/plugin/fugitive.plug index 8dd25b2..8dd25b2 100644 --- a/.vim/plugins/fugitive.plug +++ b/.vim/plugin/fugitive.plug diff --git a/.vim/plugins/general.plug b/.vim/plugin/general.plug index 4bbc709..4bbc709 100644 --- a/.vim/plugins/general.plug +++ b/.vim/plugin/general.plug diff --git a/.vim/plugins/godot.vim b/.vim/plugin/godot.vim index 49354f8..49354f8 100644 --- a/.vim/plugins/godot.vim +++ b/.vim/plugin/godot.vim diff --git a/.vim/plugins/gutentags.plug b/.vim/plugin/gutentags.plug index c2a7090..c2a7090 100644 --- a/.vim/plugins/gutentags.plug +++ b/.vim/plugin/gutentags.plug diff --git a/.vim/plugins/init.vim b/.vim/plugin/init.vim index 6b8bff2..7f71d9c 100644 --- a/.vim/plugins/init.vim +++ b/.vim/plugin/init.vim @@ -4,8 +4,8 @@ if empty(glob('~/.vim/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif -let s:plugins = split(expand('~/.dotfiles/.vim/plugins/*.plug')) -let s:settings = split(expand('~/.dotfiles/.vim/plugins/*.vim')) +let s:plugins = split(expand('~/.vim/plugin/*.plug')) +let s:settings = split(expand('~/.vim/plugin/*.vim')) function! s:load_plugins() for plugin in s:plugins diff --git a/.vim/plugins/lang.plug b/.vim/plugin/lang.plug index 338de43..338de43 100644 --- a/.vim/plugins/lang.plug +++ b/.vim/plugin/lang.plug diff --git a/.vim/plugins/leaderf.vim b/.vim/plugin/leaderf.vim index 043fe1b..043fe1b 100644 --- a/.vim/plugins/leaderf.vim +++ b/.vim/plugin/leaderf.vim diff --git a/.vim/plugins/ledger.plug b/.vim/plugin/ledger.plug index b3a1e25..b3a1e25 100644 --- a/.vim/plugins/ledger.plug +++ b/.vim/plugin/ledger.plug diff --git a/.vim/plugins/lsp.plug b/.vim/plugin/lsp.plug index 1a5704b..1a5704b 100644 --- a/.vim/plugins/lsp.plug +++ b/.vim/plugin/lsp.plug diff --git a/.vim/plugins/markdown.plug b/.vim/plugin/markdown.plug index 1e12dad..1e12dad 100644 --- a/.vim/plugins/markdown.plug +++ b/.vim/plugin/markdown.plug diff --git a/.vim/plugins/misc.plug b/.vim/plugin/misc.plug index 34de763..a634210 100644 --- a/.vim/plugins/misc.plug +++ b/.vim/plugin/misc.plug @@ -11,6 +11,4 @@ Plug 'mhinz/vim-signify' Plug 'tpope/vim-unimpaired' Plug 'godlygeek/tabular' -" colorscheme -" Plug 'sonph/onehalf', { 'rtp': 'vim' } Plug 'joshdick/onedark.vim' diff --git a/.vim/plugins/slime.plug b/.vim/plugin/slime.plug index 0989a66..0989a66 100644 --- a/.vim/plugins/slime.plug +++ b/.vim/plugin/slime.plug diff --git a/.vim/plugins/tex.plug b/.vim/plugin/tex.plug index 6c3f788..6c3f788 100644 --- a/.vim/plugins/tex.plug +++ b/.vim/plugin/tex.plug diff --git a/.vim/plugins/vimspector.plug b/.vim/plugin/vimspector.plug index a39d4bd..a39d4bd 100644 --- a/.vim/plugins/vimspector.plug +++ b/.vim/plugin/vimspector.plug diff --git a/.vim/plugins/vimwiki.plug b/.vim/plugin/vimwiki.plug index cba8593..cba8593 100644 --- a/.vim/plugins/vimwiki.plug +++ b/.vim/plugin/vimwiki.plug diff --git a/.vim/plugins/vista.plug b/.vim/plugin/vista.plug index 02264b9..02264b9 100644 --- a/.vim/plugins/vista.plug +++ b/.vim/plugin/vista.plug diff --git a/.vim/plugins/youcompleteme.vim b/.vim/plugin/youcompleteme.vim index 4c9f570..4c9f570 100644 --- a/.vim/plugins/youcompleteme.vim +++ b/.vim/plugin/youcompleteme.vim diff --git a/.vim/plugins/startify.plug b/.vim/plugins/startify.plug deleted file mode 100644 index a4f7c1d..0000000 --- a/.vim/plugins/startify.plug +++ /dev/null @@ -1 +0,0 @@ -Plug 'mhinz/vim-startify' @@ -96,8 +96,8 @@ set tags=./.tags;,.tags let mapleader=',' " change the key <leader> nnoremap <leader>cd :cd %:p:h<CR> :pwd<CR> -source ~/.dotfiles/.vim/plugins/init.vim -source ~/.dotfiles/.vim/keybindings.vim +source ~/.vim/plugin/init.vim +source ~/.vim/keybindings.vim silent colorscheme onedark diff --git a/bootstrap.sh b/bootstrap.sh index aea2465..f0876f9 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -2,6 +2,33 @@ dotfiles_dir=$(cd -- "$(dirname ${BASH_SOURCE})" > /dev/null 2>&1; pwd -P) -ln -s $dotfiles_dir/.emacs.d $HOME/.emacs.d -ln -s $dotfiles_dir/.macos $HOME/.macos -ln -s $dotfiles_dir/.urlview $HOME/.urlview +remove_and_link () { + for var in $@ + do + if [ -L $HOME/$var ] && [ -e $HOME/$var ] && \ + [ "$(readlink -- $HOME/$var)" = "$dotfiles_dir/$var" ]; then + return + fi + + rm -rf $HOME/$var + ln -s $dotfiles_dir/$var $HOME/$var + done +} + +link_all () { + remove_and_link .ctags.d .mutt bin .alias .macos \ + .mbsyncrc .msmtprc .tmux.conf .urlview .zshrc \ + .vimrc .vim +} + +main () { + if [ $# -eq 0 ] || [ $1 -eq 'all' ]; then + link_all + return + fi + + remove_and_link $@ +} + +main $@ + |