Skip to content

Commit

Permalink
chore: Reassign hotkeys for opening file in editor and search query i…
Browse files Browse the repository at this point in the history
…n browser
  • Loading branch information
LangLangBart committed Dec 10, 2023
1 parent 65bfad0 commit 55bda3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ ${WHITE_BOLD}Flags${COLOR_RESET}
${WHITE_BOLD}Hotkeys${COLOR_RESET}
${GREEN_NORMAL}? ${COLOR_RESET} help
${GREEN_NORMAL}ctrl-b${COLOR_RESET} open the file in the browser
${GREEN_NORMAL}ctrl-e${COLOR_RESET} open the file content in the editor
${GREEN_NORMAL}ctrl-h${COLOR_RESET} display the history commands
${GREEN_NORMAL}ctrl-n${COLOR_RESET} next history command
${GREEN_NORMAL}ctrl-o${COLOR_RESET} open the search query in the browser
${GREEN_NORMAL}ctrl-o${COLOR_RESET} open the file content in the editor
${GREEN_NORMAL}ctrl-p${COLOR_RESET} previous history command
${GREEN_NORMAL}ctrl-r${COLOR_RESET} reload
${GREEN_NORMAL}ctrl-t${COLOR_RESET} open the search query in the browser
${GREEN_NORMAL}enter ${COLOR_RESET} open the file in the pager
${GREEN_NORMAL}tab ${COLOR_RESET} toggle the file preview
${GREEN_NORMAL}esc ${COLOR_RESET} quit
Expand Down Expand Up @@ -556,10 +556,10 @@ view_contents() {
--bind $'start:execute-silent(echo $FZF_PORT > $store_fzf_port)+reload:gh_query {q}' \
--bind "change:first+reload:sleep 0.65; gh_query {q} || true" \
--bind 'ctrl-b:execute-silent:gh browse --repo {4} {5}:{1}' \
--bind 'ctrl-e:execute:[[ -n {q} && -n {} ]] && open_in_editor=true view_contents {}' \
--bind "ctrl-h:change-preview(view_history_commands)+change-preview-window:~0:+1" \
--bind 'ctrl-o:execute-silent:open_query_in_browser {q}' \
--bind 'ctrl-o:execute:[[ -n {q} && -n {} ]] && open_in_editor=true view_contents {}' \
--bind 'ctrl-r:reload:gh_query {q} || true' \
--bind 'ctrl-t:execute-silent:open_query_in_browser {q}' \
--bind 'enter:execute:[[ -n {q} && -n {} ]] && open_in_pager=true view_contents {}' \
--bind 'esc:become:' \
--bind '?:toggle-preview+change-preview(print_help_text)+change-preview-window:~0:+1' \
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ gh find-code [Flags] [Search query]
| --------------------------- | ------------------------------------ |
| <kbd>?</kbd> | help |
| <kbd>ctrl</kbd><kbd>b</kbd> | open the file in the browser |
| <kbd>ctrl</kbd><kbd>e</kbd> | open the file content in the editor |
| <kbd>ctrl</kbd><kbd>e</kbd> | display the history commands |
| <kbd>ctrl</kbd><kbd>h</kbd> | display the history commands |
| <kbd>ctrl</kbd><kbd>n</kbd> | next history command |
| <kbd>ctrl</kbd><kbd>o</kbd> | open the search query in the browser |
| <kbd>ctrl</kbd><kbd>o</kbd> | open the file content in the editor |
| <kbd>ctrl</kbd><kbd>p</kbd> | previous history command |
| <kbd>ctrl</kbd><kbd>r</kbd> | reload |
| <kbd>ctrl</kbd><kbd>t</kbd> | open the search query in the browser |
| <kbd>enter</kbd> | open the file in the pager |
| <kbd>tab</kbd> | toggle the file preview |
| <kbd>esc</kbd> | quit |
Expand Down

0 comments on commit 55bda3c

Please sign in to comment.