Change symlink scheme and add vim-amino as submodule

This commit is contained in:
Stochastica 2021-01-03 02:45:58 -05:00
parent 194b776298
commit deb521d762
3 changed files with 23 additions and 11 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "home/vim/vim-amino"]
path = home/vim/vim-amino
url = git@gitlab.com:Stochastica/vim-amino.git

1
home/vim/vim-amino Submodule

@ -0,0 +1 @@
Subproject commit e662f56e98b20e0c9b9500380cf136d9044e76b4

View File

@ -1,25 +1,33 @@
#!/bin/bash
# Calculate directory relative to $HOME
BASE=$(realpath --relative-to=$HOME $PWD)
echo $BASE
DIR=$HOME
BASE=$(realpath --relative-to=$DIR $PWD)
pushd $HOME >> /dev/null
ln -vs $BASE/home/vimrc .vimrc
ln -vs $BASE/home/bashrc .bashrc
popd >> /dev/null
# Create ftplugin links
D_VIM_AFTER_FTPLUGIN=$HOME/.vim/after/ftplugin
mkdir -p $D_VIM_AFTER_FTPLUGIN
pushd $D_VIM_AFTER_FTPLUGIN >> /dev/null
DIR=$HOME/.vim/after/ftplugin
BASE=$(realpath --relative-to=$DIR $PWD)
mkdir -p $DIR
pushd $DIR >> /dev/null
ln -vs $BASE/home/vim/after/ftplugin/tex.vim .
popd >> /dev/null
D_CONFIG_FISH=$HOME/.config/fish
mkdir -p $D_CONFIG_FISH
pushd $D_CONFIG_FISH >> /dev/null
DIR=$HOME/.vim/colors
BASE=$(realpath --relative-to=$DIR $PWD)
mkdir -p $DIR
pushd $DIR >> /dev/null
ln -vs $BASE/home/vim/vim-amino/amino.vim .
popd >> /dev/null
DIR=$HOME/.config/fish
BASE=$(realpath --relative-to=$DIR $PWD)
mkdir -p $DIR
pushd $DIR >> /dev/null
ln -vs $BASE/home/fish/fishd_color .
ln -vs $BASE/home/fish/functions .
popd >> /dev/null
popd >> /dev/null