kakoune: replace pickers with live-grep
This commit is contained in:
1 parent
0dd8b02a28
commit
c96461a898
1 file changed
+4
-27
@@ -287,34 +287,11 @@ bundle match 'https://github.com/kmafeni04/match.kak' %{
|
|||||||
map global match U ': match-surround-redo<ret>' -docstring "Redo"
|
map global match U ': match-surround-redo<ret>' -docstring "Redo"
|
||||||
}
|
}
|
||||||
|
|
||||||
# PICKERS
|
# LIVE GREP
|
||||||
|
|
||||||
bundle pickers https://codeberg.org/kmafeni04/pickers.kak %{
|
bundle live-grep https://codeberg.org/raiguard/kak-live-grep %{
|
||||||
declare-user-mode pickers
|
map global -docstring 'Live grep' file-mode g ': live-grep<ret>'
|
||||||
map global user u ':enter-user-mode pickers<ret>' -docstring 'pickers mode'
|
map global -docstring 'Live grep (selection)' file-mode 'G' ': live-grep %val{selection}<ret>'
|
||||||
map global pickers b ':pickers-buffer<ret>' -docstring 'Open fuzzy buffer picker'
|
|
||||||
map global pickers i ':pickers-buffer-info<ret>' -docstring 'Show currently open buffers'
|
|
||||||
map global pickers a ':pickers-buffer-alternate<ret>' -docstring 'Switch to previously opened buffer'
|
|
||||||
map global pickers f ':pickers-file<ret>' -docstring 'Open fuzzy file picker in git root or current working directory'
|
|
||||||
map global pickers n ':pickers-file /home/lupan/notes/<ret>' -docstring 'Open fuzzy file picker in notes directory'
|
|
||||||
map global pickers o ':pickers-file-cbd<ret>' -docstring "Open fuzzy file picker in current buffer's directory"
|
|
||||||
map global pickers g ':pickers-grep<ret>' -docstring "Open grep picker in git root"
|
|
||||||
map global pickers G "<dquote>/y:pickers-grep<ret>" -docstring "Open grep picker in git root with selection as init"
|
|
||||||
map global pickers <a-g> ':pickers-grep-cbd<ret>' -docstring "Open grep picker in buffer's directory"
|
|
||||||
map global pickers <a-G> "<dquote>/y:pickers-grep-cbd<ret>" -docstring "Open grep picker in buffer's directory with selection as init"
|
|
||||||
|
|
||||||
hook global WinCreate \*pickers-grep\* %{
|
|
||||||
map window normal <ret> ':pickers-grep-open<ret>'
|
|
||||||
map window normal <a-ret> "%%s<ret>)" -docstring "Select all matched grep text"
|
|
||||||
alias window write pickers-grep-write
|
|
||||||
alias window w pickers-grep-write
|
|
||||||
}
|
|
||||||
hook global WinCreate \*pickers-file\* %{
|
|
||||||
map window normal <ret> ':pickers-file-open<ret>'
|
|
||||||
}
|
|
||||||
hook global WinCreate \*pickers-buffer\* %{
|
|
||||||
map window normal <ret> ':pickers-buffer-open<ret>'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# HARPOON
|
# HARPOON
|
||||||
|
|||||||
Reference in new issue
Block a user