Add nnn config
This commit is contained in:
parent
292bdb6c62
commit
e0162f2613
|
@ -16,6 +16,9 @@ export MACHINE_START_SWAY=false # Whether to start Sway from bash
|
||||||
|
|
||||||
alias ssh="TERM=xterm-256color ssh"
|
alias ssh="TERM=xterm-256color ssh"
|
||||||
|
|
||||||
|
# NNN configuration
|
||||||
|
alias nnn="VISUAL=$HOME/.local/bin/vim-wrapper nnn -e"
|
||||||
|
|
||||||
# SSH without checking or adding host keys to known_hosts
|
# SSH without checking or adding host keys to known_hosts
|
||||||
# Useful for cloud server rescue environment & installation
|
# Useful for cloud server rescue environment & installation
|
||||||
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"
|
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"
|
||||||
|
|
13
nnn/.local/bin/vim-wrapper
Executable file
13
nnn/.local/bin/vim-wrapper
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$TERM_PROGRAM" != "WezTerm" ]; then
|
||||||
|
exec vim "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pane_id=$(wezterm cli get-pane-direction Right)
|
||||||
|
|
||||||
|
if [ -z "$pane_id" ]; then
|
||||||
|
exec wezterm cli split-pane --right --percent 70 -- vim "$@"
|
||||||
|
else
|
||||||
|
exec wezterm cli spawn -- vim "$@"
|
||||||
|
fi
|
Loading…
Reference in a new issue