Skip to content

Commit

Permalink
♻️ Update and sync vimrc with alrra's + add set mouse=a
Browse files Browse the repository at this point in the history
This commit improves readability and ease of use for the vimrc settings file, mainly through reordering, adding descriptive comments, and integrating the MinPac package manager. Notable changes include:

- Replaced Vundle with MinPac for package management, providing lighter and faster operation.
- Added custom commands for managing plugins with MinPac.
- Used "set" before each setting for consistency and readability.
- Added separators between different setting sections for easier navigation.
- Explained 'what' each setting does and moved complex explanations into comments.
- Updated the Emmet trigger key and the plugins list.
- Changed the plugin initialization process to be more robust and handle errors silently.
- Fixed inconsistencies in indentation and comment starts.
- Changed key mappings to use the comma as leader key for easier reach.
- Included webapi-vim plugin and JavaScript syntastic checker.
- Set spell checking language en_us.
- Enhanced the color scheme settings for Terminal mode.

The update is primarily aimed at simplifying Vim's initial setup process, improving navigation within the vimrc file, and ensuring a more user-friendly experience.
  • Loading branch information
wingy3181 committed Dec 3, 2023
1 parent a1fca36 commit 7e8839a
Show file tree
Hide file tree
Showing 31 changed files with 413 additions and 256 deletions.
29 changes: 6 additions & 23 deletions src/os/installs/vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,23 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \

install_plugins() {

declare -r VUNDLE_DIR="$HOME/.vim/plugins/Vundle.vim"
declare -r VUNDLE_GIT_REPO_URL="https://github.com/VundleVim/Vundle.vim.git"
declare -r VIM_PACK_DIR="$HOME/.vim/pack"
declare -r MINPAC_DIR="$VIM_PACK_DIR/minpac/opt/minpac"
declare -r MINPAC_GIT_REPO_URL="https://github.com/k-takata/minpac.git"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Install plugins.

execute \
"rm -rf '$VUNDLE_DIR' \
&& git clone --quiet '$VUNDLE_GIT_REPO_URL' '$VUNDLE_DIR' \
&& printf '\n' | vim +PluginInstall +qall" \
"rm -rf $VIM_PACK_DIR \
&& git clone --quiet $MINPAC_GIT_REPO_URL $MINPAC_DIR" \
"Install plugins" \
|| return 1

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Install additional things required by some plugins.
# In the case of fresh installs, in order for `npm` to be
# available, the `~/bash.local` file needs to be sourced

execute \
". $HOME/.bash.local \
&& cd $HOME/.vim/plugins/tern_for_vim \
&& npm install" \
"Install plugins (extra installs for 'tern_for_vim')"

}

update_plugins() {

execute \
"vim +PluginUpdate +qall" \
"Update plugins"
vim +PluginsSetup

}

Expand All @@ -51,7 +35,6 @@ main() {

"./$(get_os)/vim.sh"
install_plugins
update_plugins

}

Expand Down
Empty file.
Empty file.
1 change: 0 additions & 1 deletion src/vim/vim/plugins/Vundle.vim
Submodule Vundle.vim deleted from 0765c5
1 change: 0 additions & 1 deletion src/vim/vim/plugins/ctrlp.vim
Submodule ctrlp.vim deleted from 564176
1 change: 0 additions & 1 deletion src/vim/vim/plugins/delimitmate
Submodule delimitmate deleted from 537a1d
1 change: 0 additions & 1 deletion src/vim/vim/plugins/editorconfig-vim
Submodule editorconfig-vim deleted from 0d54ea
1 change: 0 additions & 1 deletion src/vim/vim/plugins/emmet-vim
Submodule emmet-vim deleted from def5d5
1 change: 0 additions & 1 deletion src/vim/vim/plugins/html5.vim
Submodule html5.vim deleted from 7c9f6f
1 change: 0 additions & 1 deletion src/vim/vim/plugins/jshint2.vim
Submodule jshint2.vim deleted from eef949
1 change: 0 additions & 1 deletion src/vim/vim/plugins/neocomplcache.vim
Submodule neocomplcache.vim deleted from 1e6ff1
1 change: 0 additions & 1 deletion src/vim/vim/plugins/neosnippet
Submodule neosnippet deleted from efb2a6
1 change: 0 additions & 1 deletion src/vim/vim/plugins/neosnippet-snippets
Submodule neosnippet-snippets deleted from 725c98
1 change: 0 additions & 1 deletion src/vim/vim/plugins/nerdtree
Submodule nerdtree deleted from 4c588f
1 change: 0 additions & 1 deletion src/vim/vim/plugins/syntastic
Submodule syntastic deleted from 8d5e37
1 change: 0 additions & 1 deletion src/vim/vim/plugins/tabular
Submodule tabular deleted from 339091
1 change: 0 additions & 1 deletion src/vim/vim/plugins/tcomment_vim
Submodule tcomment_vim deleted from 90eaf7
1 change: 0 additions & 1 deletion src/vim/vim/plugins/tern_for_vim
Submodule tern_for_vim deleted from 994ffb
1 change: 0 additions & 1 deletion src/vim/vim/plugins/unicode.vim
Submodule unicode.vim deleted from bc20d0
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-colors-solarized
Submodule vim-colors-solarized deleted from 528a59
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-commentary
Submodule vim-commentary deleted from e87cd9
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-css-color
Submodule vim-css-color deleted from 6cc657
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-es6
Submodule vim-es6 deleted from 3f080e
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-fugitive
Submodule vim-fugitive deleted from 46eaf8
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-indent-guides
Submodule vim-indent-guides deleted from a1e139
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-javascript-syntax
Submodule vim-javascript-syntax deleted from 7b8e2e
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-markdown
Submodule vim-markdown deleted from 46add6
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-repeat
Submodule vim-repeat deleted from 24afe9
1 change: 0 additions & 1 deletion src/vim/vim/plugins/vim-surround
Submodule vim-surround deleted from 3d188e
1 change: 0 additions & 1 deletion src/vim/vim/plugins/webapi-vim
Submodule webapi-vim deleted from 70c49a
Loading

0 comments on commit 7e8839a

Please sign in to comment.