Browse Source

fzf-vim: don't open Vim if no file is selected

red-hat-laptop
Kevin Mok 5 years ago
parent
commit
0194419465
Signed by: Kevin-Mok GPG Key ID: 6E920656BBAD3E6C
  1. 1
      aliases/key_dirs.tmpl
  2. 5
      dot_config/fish/functions/fzf-vim.fish

1
aliases/key_dirs.tmpl

@ -38,6 +38,7 @@ hbd ~/.habitctl
ib ~/linux-config/dot_config/i3blocks/scripts
ra ~/linux-config/dot_config/ranger
rd ~/Documents/red-discord-bot
rdt ~/coding/red-discord-bot
sr ~/linux-config/scripts
snp ~/.vim/plugged/vim-snippets/UltiSnips
sw ~/.local/share/nvim/swap/

5
dot_config/fish/functions/fzf-vim.fish

@ -1,3 +1,6 @@
function fzf-vim
fzf | xargs $EDITOR
set file (fzf)
if test ! -z "$file"
$EDITOR $file
end
end
Loading…
Cancel
Save