Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:f64b634dd8
This commit is contained in:
19
dots/.bashrc.d/editor
Normal file
19
dots/.bashrc.d/editor
Normal file
@@ -0,0 +1,19 @@
|
||||
# shellcheck shell=bash
|
||||
# vim: set ft=bash :
|
||||
|
||||
# Set NeoVim as default editor
|
||||
export EDITOR=nvim
|
||||
export SUDO_EDITOR="$EDITOR"
|
||||
|
||||
declare -A -r EDITOR_CONFIGS=(
|
||||
["nvim"]="$HOME/.config/nvim/init.lua"
|
||||
["vim"]="$HOME/.vimrc"
|
||||
)
|
||||
|
||||
edit_editor_config() {
|
||||
for editor in "${!EDITOR_CONFIGS[@]}"; do
|
||||
if [ "$EDITOR" = "$editor" ]; then
|
||||
$EDITOR "${EDITOR_CONFIGS[$editor]}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user