mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(nvim): improved keymaps
This commit is contained in:
parent
9e9b03a7a1
commit
a1aff2d68e
9 changed files with 75 additions and 90 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Name each session with the name of the directory where tmux is invoked
|
||||
# If there's already a session present for that directory, fuzzy search your way through
|
||||
function tmux_sessionizer --description 'manages tmux sessions'
|
||||
function tmux_sessionizer --description 'manage tmux sessions'
|
||||
tmux start-server
|
||||
|
||||
if test -z $argv
|
||||
|
|
@ -16,16 +16,7 @@ function tmux_sessionizer --description 'manages tmux sessions'
|
|||
tmux new-session -s "$PWD" "$cmd"
|
||||
else
|
||||
# attach to existing session(s)
|
||||
set -f choice (string join ';' "new" (tmux list-sessions -F "#{session_name}") | tr ';' '\n' | fzf)
|
||||
|
||||
if test -z $choice
|
||||
echo "[exited fzf]"
|
||||
else if test $choice = "new"
|
||||
read -l -P "How would you like to name this session? " custom_name
|
||||
tmux new-session -s "$custom_name"@"$PWD" "$cmd"
|
||||
else
|
||||
tmux attach-session -t "$choice"
|
||||
end
|
||||
tmux_attach $argv
|
||||
end
|
||||
|
||||
commandline --function repaint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue