dotfiles/fish.configlink/functions/recent.fish

7 lines
257 B
Fish
Raw Normal View History

2021-04-28 12:58:14 +00:00
function recent --description "Open a recent file in Vim"
2021-05-04 13:47:58 +00:00
set vimfile (fd -t f --exec stat -f "%m%t%N" | sort -nr | cut -f2 | fzf)
and set vimfile (echo $vimfile | tr -d '\r')
and commandline -r "vim $vimfile"
and commandline -f execute
2021-04-28 12:58:14 +00:00
end