You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a bunch of things to my local kak files for this plugin. It's similar to how cargo.kak jumps to files from cargo errors.
I add the line set-option buffer filetype harpoon to set the file type in the :peek command.
# Add and remove hooks to pressing enter
hook global WinSetOption filetype=harpoon %{
map -docstring "Jump to position" buffer normal <ret> %{: harpoon-jump<ret>}
}
hook global WinSetOption filetype=(?!harpoon).* %{
unmap buffer normal <ret> %{: harpoon-jump<ret>}
}
declare-option -docstring "regex describing file paths and line numbers" \
regex \
harpoon_file_pattern \
"/(\w|\.|/)+:\d+:\d+"
# jump to file where the cursor is
define-command harpoon-jump %{
evaluate-commands -save-regs fl %{
execute-keys -draft "g" "h" "/" %opt{harpoon_file_pattern} <ret> "<a-;>" ";T:" '"fy' 'llT:"ly'
harpoon-line-column %reg{f} %reg{l}
}
}
# helper
define-command harpoon-line-column -params 2 %{
evaluate-commands -try-client %opt{jumpclient} %{
edit -existing "%arg{1}" "%arg{2}"
try %{ focus }
}
} -docstring "Like edit but understands file:line:col parameters"
The text was updated successfully, but these errors were encountered:
I added a bunch of things to my local kak files for this plugin. It's similar to how cargo.kak jumps to files from cargo errors.
I add the line
set-option buffer filetype harpoon
to set the file type in the :peek command.The text was updated successfully, but these errors were encountered: