
fvim() {
  local file=$(fd "$BUFFER" ./ -t file -H | fzf --prompt "[file]: " --preview 'bat --color always --style header,grid --line-range :100 {}' --query "$LBUFFER")
  if [[ -n "$file" ]]; then
    BUFFER="nvim ${file}"
    zle accept-line