Add configuration for vim
- Add ~/.config/vim/vimrc
+ Configure basic stuff
+ Activate spell checks
+ Activate syntax highlighting and ruler
+ Show whitespace characters
+ Add various snippets for mouse handling,
toggling line numbers, and search
+ Set `vim`-related directories inside
~/.config/vim and ~/.local/state/vim
- Integrate extra settings for Python files
in ~/.config/vim/after/ftplugin/python.vim
and ~/.config/vim/after/syntax/python.vim
- Add `vim` artifacts in ~/.config/git/ignore
This commit is contained in:
parent
4d9e800d94
commit
8f7cef086b
12 changed files with 611 additions and 1 deletions
|
|
@ -3,6 +3,22 @@
|
|||
# Aliases used in all kinds of shells
|
||||
|
||||
|
||||
# Make this file work standalone in non-interactive `bash` (e.g., ":!cmd" in `vim`)
|
||||
|
||||
if [ -n "${BASH_VERSION:-}" ]; then
|
||||
shopt -s expand_aliases
|
||||
fi
|
||||
|
||||
if ! command -v _command_exists >/dev/null 2>&1; then
|
||||
# This utility is supposed to be defined only in ~/.profile but copied here
|
||||
# to make `$BASH_ENV` work in `vim`, which sources this file only
|
||||
_command_exists() {
|
||||
command -v "$1" 1>/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Manage the bare `git` repository in ~/ holding the dotfiles
|
||||
alias dotfiles='git --git-dir=$DOTFILES_DIR --work-tree=$HOME'
|
||||
|
||||
|
|
@ -164,3 +180,11 @@ if _command_exists pyenv; then
|
|||
alias pyvers='pyenv versions --skip-aliases'
|
||||
alias pywhich='pyenv which'
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if _command_exists vim; then
|
||||
alias v=vim
|
||||
_command_exists sudoedit && alias sv=sudoedit
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue