ref(nvim): config cleanup

This commit is contained in:
Léana 江 2023-04-01 14:00:53 +02:00
parent 77007e111c
commit 373c5ad84b
5 changed files with 10 additions and 50 deletions

View file

@ -44,8 +44,7 @@ alias tree='tree -Cph -L 1'
abbr t 'tree'
abbr ta 'tree -a'
abbr v nvim
abbr tv tmux-sessionizer
abbr v tmux-vim
abbr d 'cd ~/.dotfiles/.config/'
abbr r 'cd ~/repos/'

View file

@ -1,16 +1,14 @@
# idea stolen from the one and only primeagen
# aiming to create one session per directory
function tmux-sessionizer
set -f session (string escape -- $PWD)
function tmux-vim
set -f session (snakecase $PWD)
tmux start-server
if not tmux has-session -t $session > /dev/null 2>&1
tmux new-session -d -s $session 'nvim'
tmux new-window -t $session:1 'fish'
tmux new-session -d -s $session -n 'nvim' 'nvim'
end
tmux select-window -t $session:0
tmux attach-session -t $session
end