Browse Source

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

master
Kevin Mok 8 months ago
parent
commit
0194419465
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions
  1. 1
    0
      aliases/key_dirs.tmpl
  2. 4
    1
      dot_config/fish/functions/fzf-vim.fish

+ 1
- 0
aliases/key_dirs.tmpl View File

@@ -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/

+ 4
- 1
dot_config/fish/functions/fzf-vim.fish View File

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

Loading…
Cancel
Save