From 7e009a8b506343c2cdee59be69ceddf5e3178a36 Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 19 Nov 2023 15:42:05 +0100 Subject: [PATCH] fix: the one true vim --- crates/10-zsh/files/.zshrc | 3 ++- crates/20-vim/crate.sh | 4 ++-- crates/20-vim/files/.nvimrc | 17 +++++++++++++++++ crates/20-vim/files/.vimrc | 3 --- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 crates/20-vim/files/.nvimrc delete mode 100644 crates/20-vim/files/.vimrc diff --git a/crates/10-zsh/files/.zshrc b/crates/10-zsh/files/.zshrc index 5e5ea4e..ffbebf3 100644 --- a/crates/10-zsh/files/.zshrc +++ b/crates/10-zsh/files/.zshrc @@ -42,4 +42,5 @@ container() { ash } -alias q="exit" \ No newline at end of file +alias q="exit" +alias vim="nvim" \ No newline at end of file diff --git a/crates/20-vim/crate.sh b/crates/20-vim/crate.sh index 3210eac..2b465b1 100644 --- a/crates/20-vim/crate.sh +++ b/crates/20-vim/crate.sh @@ -4,11 +4,11 @@ describe="Install vim and it's stuff" scripts="@distro @self" apply() { - [ -e "$HOME/.vimrc" ] || ln files/.vimrc $HOME/.vimrc + [ -e "$HOME/.nvimrc" ] || ln files/.nvimrc $HOME/.nvimrc [ -e "$HOME/.ideavimrc" ] || ln files/.ideavimrc $HOME/.ideavimrc } undo() { - unlink $HOME/.vimrc + unlink $HOME/.nvimrc unlink $HOME/.ideavimrc } \ No newline at end of file diff --git a/crates/20-vim/files/.nvimrc b/crates/20-vim/files/.nvimrc new file mode 100644 index 0000000..c50c376 --- /dev/null +++ b/crates/20-vim/files/.nvimrc @@ -0,0 +1,17 @@ +" vim preferences +set number +set relativenumber +syntax on + +" ensure vim-plug +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +call plug#begin() + +Plug 'ThePrimeagen/vim-be-good' + +call plug#end() diff --git a/crates/20-vim/files/.vimrc b/crates/20-vim/files/.vimrc deleted file mode 100644 index 8f61924..0000000 --- a/crates/20-vim/files/.vimrc +++ /dev/null @@ -1,3 +0,0 @@ -set number -set relativenumber -syntax on