New: inital vimterm config

This commit is contained in:
Akemi Izuko 2023-03-28 22:47:55 -06:00
parent 66f232e71a
commit ea77e832c9
No known key found for this signature in database
GPG key ID: 905D444F6A5E4BE4
4 changed files with 15 additions and 2 deletions

View file

@ -109,6 +109,7 @@ fi
# nVim
if command -v nvim &> /dev/null; then
alias vi='nvim' vih='nvim +Rooter'
alias vit='nvim +"tnoremap <C-k> <C-\><C-n>" +startinsert +terminal '
elif command -v vim &> /dev/null; then
alias vi='vim' vih='vim +Rooter'
fi

View file

@ -169,11 +169,16 @@ runk() {
local calc_ver="($(echo "$@" | sed \
-e 's#log2(\([^)]\+\))#(log(\1)/log(2))#g' \
-e 's#\([0-9]\+\)C\([0-9]\+\)#(\1! / ((\1-\2)! * (\2)!))#g' \
-e 's#(\([^)C]\+\))C(\([^)C]\+\))#((\1)! / ((\1-(\2))! * (\2)!))#g' \
))"
local py_ver="$(echo "$@" | sed \
-e 's#\^#**#g' \
-e 's#\(log([^)]\+)\)#(\1/log(10))#g' \
-e 's#ln(\([^)]\+\))#log(\1)#g' \
-e 's#\([0-9]\+\)C\([0-9]\+\)#(\1! / (factorial(\1-\2) * (\2)!))#g' \
-e 's#\([0-9]\+\)!#factorial(\1)#g' \
-e 's#(\([^)]\+\))!#factorial(\1)#g' \
)"
local awk_ver="$(echo "$@" | sed \
-e 's#\*\*#^#g' \
@ -192,7 +197,7 @@ runk() {
calc "$calc_ver"
if [[ $is_verbose -eq 1 ]]; then printf 'Using calc: %s\n' "$calc_ver"; fi
elif command -v python3 &>/dev/null && [[ -z "$override" ]] || [[ "$override" == p ]]; then
python3 -c "from math import *; print($py_ver)"
python3 -c "from math import *; print(f\"\\t{$py_ver}\")"
if [[ $is_verbose -eq 1 ]]; then printf 'Using python: %s\n' "$py_ver"; fi
elif command -v gawk &>/dev/null && [[ -z "$override" ]] || [[ "$override" == a ]]; then
gawk --bignum "BEGIN { print $awk_ver }"

View file

@ -74,7 +74,9 @@ set_starting_dir () {
# =============================================================================
# Run script
# =============================================================================
source ~/.bashrc
if [[ -z $VIMRUNTIME || -n $IS_VIFM_NEST ]]; then
source ~/.bashrc
fi
source ~/.bash_prompt
[[ "$IS_VIFM_NEST" == 'T' ]] || print_welcome_message

View file

@ -10,6 +10,11 @@ source ~/.bash_functions
source ~/.bash_aliases
source ~/.bash_functions
if [[ -n $VIMRUNTIME && -z $IS_VIFM_NEST ]]; then
# Prevent recursive sourcing
source ~/.bash_profile
fi
# shopt -s histappend
# Suppress prompt warning when switching users