Skip to content

Instantly share code, notes, and snippets.

@rochacbruno
Created September 20, 2023 10:49
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 rochacbruno/415a4e39e120c2dee660d4fab55437de to your computer and use it in GitHub Desktop.
Save rochacbruno/415a4e39e120c2dee660d4fab55437de to your computer and use it in GitHub Desktop.
Helix file picker
### requires the script lf-pick on path
### Requires lf installed https://github.com/gokcehan/lf
### lf has the keybindings: <space> select file, lowercase `l` accept selection
### or use arrow right to open the file
### This allows selecting multiple files with space and then hit `l` to open
# touch ~/.local/bin/lf-pick
# chmod +x ~/.local/bin/lf-pick
# function lfp(){
# local TEMP=$(mktemp)
# lf -selection-path=$TEMP
# cat $TEMP
# }
# lfp
e = [
":new",
":insert-output lf-pick",
"select_all",
"split_selection_on_newline",
"goto_file",
"goto_last_modified_file",
":buffer-close!",
":redraw",
]
### File Picker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment