Skip to content

Commit

Permalink
Wrote fish vim session handler function
Browse files Browse the repository at this point in the history
  • Loading branch information
handdara committed Nov 26, 2024
1 parent 2397868 commit f446f3f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fst/hish/fish-main/functions/fesh.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function fesh
set PROJPATH '~/code:~/apps'
set projdir (begin
for dir in $PROJPATH
fd --format '{//}' -e md -e txt -iHId 2 'readme' (string replace '~' $HOME $dir) \
| string replace $HOME '~'
end | fzf
end)
if not test $projdir
echo "Cancelled!" >&2
return 1
else
cd (string replace '~' $HOME $projdir)
if test -e Session.vim
nvim -S Session.vim
else
nvim
end
end
end

0 comments on commit f446f3f

Please sign in to comment.