Skip to content

Commit

Permalink
update location of neovim config, update link.sh
Browse files Browse the repository at this point in the history
* move ~/.nvim to ~/.config/nvim
* move ~/.nvimrc to ~/.config/nvim/init.vim
* update install/link.sh to skip already existing files
* update install/link.sh to handle creating symlinks for files in newly created config/ directory

These changes are consistent with the latest neovim install, which moves away from ~/.nvim and ~/.nvimrc
  • Loading branch information
nicknisi committed Oct 30, 2015
1 parent a61d3b6 commit 316a7a6
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.netrwhist
npm-debug.log
vim/vim.symlink/plugged/
nvim/nvim.symlink/plugged/

plug.vim.old

config/nvim/spell
config/nvim/shada
config/nvim/plugged
vim/vim.symlink/spell/
nvim/nvim.symlink/spell/
nvim/nvim.symlink/shada/
vim/vim.symlink/plugged/
File renamed without changes.
2 changes: 1 addition & 1 deletion nvim/nvimrc.symlink → config/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
call plug#begin('~/.nvim/plugged')
call plug#begin('~/.config/nvim/plugged')

" colorschemes
Plug 'chriskempson/base16-vim'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 25 additions & 3 deletions install/link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,32 @@

DOTFILES=$HOME/.dotfiles

echo "creating symlinks"
echo -e "\nCreating symlinks"
echo "=============================="
linkables=$( find -H "$DOTFILES" -maxdepth 3 -name '*.symlink' )
for file in $linkables ; do
target="$HOME/.$( basename $file ".symlink" )"
echo "creating symlink for $file"
ln -s $file $target
if [ -e $target ]; then
echo "~${target#$HOME} already exists... Skipping."
else
echo "Creating symlink for $file"
ln -s $file $target
fi
done

echo -e "\n\ninstalling to ~/.config"
echo "=============================="
if [ ! -d $HOME/.config ]; then
echo "Creating ~/.config"
mkdir -p $HOME/.config
fi
# configs=$( find -path "$DOTFILES/config.symlink" -maxdepth 1 )
for config in $DOTFILES/config/*; do
target=$HOME/.config/$( basename $config )
if [ -e $target ]; then
echo "~${target#$HOME} already exists... Skipping."
else
echo "Creating symlink for $config"
ln -s $config $target
fi
done

0 comments on commit 316a7a6

Please sign in to comment.