New: inital vimterm config
This commit is contained in:
parent
3cdbe44c33
commit
f02f0e183d
|
@ -109,6 +109,7 @@ fi
|
||||||
# nVim
|
# nVim
|
||||||
if command -v nvim &> /dev/null; then
|
if command -v nvim &> /dev/null; then
|
||||||
alias vi='nvim' vih='nvim +Rooter'
|
alias vi='nvim' vih='nvim +Rooter'
|
||||||
|
alias vit='nvim +"tnoremap <C-k> <C-\><C-n>" +startinsert +terminal '
|
||||||
elif command -v vim &> /dev/null; then
|
elif command -v vim &> /dev/null; then
|
||||||
alias vi='vim' vih='vim +Rooter'
|
alias vi='vim' vih='vim +Rooter'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -169,11 +169,16 @@ runk() {
|
||||||
|
|
||||||
local calc_ver="($(echo "$@" | sed \
|
local calc_ver="($(echo "$@" | sed \
|
||||||
-e 's#log2(\([^)]\+\))#(log(\1)/log(2))#g' \
|
-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 \
|
local py_ver="$(echo "$@" | sed \
|
||||||
-e 's#\^#**#g' \
|
-e 's#\^#**#g' \
|
||||||
-e 's#\(log([^)]\+)\)#(\1/log(10))#g' \
|
-e 's#\(log([^)]\+)\)#(\1/log(10))#g' \
|
||||||
-e 's#ln(\([^)]\+\))#log(\1)#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 \
|
local awk_ver="$(echo "$@" | sed \
|
||||||
-e 's#\*\*#^#g' \
|
-e 's#\*\*#^#g' \
|
||||||
|
@ -192,7 +197,7 @@ runk() {
|
||||||
calc "$calc_ver"
|
calc "$calc_ver"
|
||||||
if [[ $is_verbose -eq 1 ]]; then printf 'Using calc: %s\n' "$calc_ver"; fi
|
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
|
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
|
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
|
elif command -v gawk &>/dev/null && [[ -z "$override" ]] || [[ "$override" == a ]]; then
|
||||||
gawk --bignum "BEGIN { print $awk_ver }"
|
gawk --bignum "BEGIN { print $awk_ver }"
|
||||||
|
|
|
@ -74,7 +74,9 @@ set_starting_dir () {
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Run script
|
# Run script
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
source ~/.bashrc
|
if [[ -z $VIMRUNTIME || -n $IS_VIFM_NEST ]]; then
|
||||||
|
source ~/.bashrc
|
||||||
|
fi
|
||||||
source ~/.bash_prompt
|
source ~/.bash_prompt
|
||||||
|
|
||||||
[[ "$IS_VIFM_NEST" == 'T' ]] || print_welcome_message
|
[[ "$IS_VIFM_NEST" == 'T' ]] || print_welcome_message
|
||||||
|
|
|
@ -10,6 +10,11 @@ source ~/.bash_functions
|
||||||
source ~/.bash_aliases
|
source ~/.bash_aliases
|
||||||
source ~/.bash_functions
|
source ~/.bash_functions
|
||||||
|
|
||||||
|
if [[ -n $VIMRUNTIME && -z $IS_VIFM_NEST ]]; then
|
||||||
|
# Prevent recursive sourcing
|
||||||
|
source ~/.bash_profile
|
||||||
|
fi
|
||||||
|
|
||||||
# shopt -s histappend
|
# shopt -s histappend
|
||||||
|
|
||||||
# Suppress prompt warning when switching users
|
# Suppress prompt warning when switching users
|
||||||
|
|
Loading…
Reference in a new issue