Closed smaftoul closed 6 years ago
If you want to symlink a file into your bin directory as a part of building your dotfiles, the best way to do this would be to define a fresh_after_build
function in your freshrc
file:
fresh_after_build() {
ln -sf /usr/local/bin/nvim ~/bin/vim
ln -sf vim ~/bin/vi
}
Another option is to use a wrapper bin script like the following:
#!/bin/sh
exec /usr/local/bin/nvim "$@"
Aside: Homebrew’s vim formula provides a --with-override-system-vi
option which can be used like brew install vim --with-override-system-vi
which I use to accomplish this but it seems the neovim formula doesn’t have this feature.
Thanks for these tips ! Closing , it's never too late ;)
Is it possible to link files outside of $home ? My usecase: I installed neovim with brew which creates a
/usr/local/bin/nvim
. Now I want to replacevi
andvim
withnvim
and in order to do so , I thought I might link/usr/local/bin/nvim
to~/bin/vi[m]
, but I can't seem to find a way to achieve this with freshshell. Is this something possible ?