Skip to content

Instantly share code, notes, and snippets.

@gbirke
Created May 2, 2020 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbirke/c7e071ce78bda2234fde981bde8b06c4 to your computer and use it in GitHub Desktop.
Save gbirke/c7e071ce78bda2234fde981bde8b06c4 to your computer and use it in GitHub Desktop.
Script for NVAlt-like usage of fzf
#!/bin/bash
# A script for use with fzf in a nvalt-like setting
# (Either selecting a file or creating a new one)
# Use like this: fzf --bind "enter:execute(./vimquery {q} {})+abort"
if [ -z "$2" ]; then
if [ ! -z "$1" ]; then
vim "$1.md"
fi
else
vim "$2"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment