Skip to content

Instantly share code, notes, and snippets.

@FeepingCreature
Created May 5, 2023 16:21
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 FeepingCreature/5134c64e84b9905cee1b6310f6078fd3 to your computer and use it in GitHub Desktop.
Save FeepingCreature/5134c64e84b9905cee1b6310f6078fd3 to your computer and use it in GitHub Desktop.
# bind ctrl-G to "directory up"
bind '"\C-g":"cd ..\C-m"'
# bind ctrl-E to "edit fuzzy"
function edit_fuzzy() {
TARGET=$(fzf)
if [ $? -eq 0 ]
then
echo -e "${PS1@P}edit $TARGET"
history -s "edit $TARGET"
edit "$TARGET"
READLINE_LINE=""
fi
}
bind -x '"\C-e":edit_fuzzy'
export FZF_DEFAULT_OPTS=$(echo ' --color=fg:#cfcfcf,bg:#141414,hl:#ffffff'\
'--color=fg+:#cfcfcf,bg+:#2b2b2b,hl+:#ffffff'\
'--color=info:#afaf87,prompt:#d7005f,pointer:#af5fff'\
'--color=marker:#87ff00,spinner:#af5fff,header:#87afaf'\
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment