mirror of
https://github.com/mawww/kakoune.git
synced 2024-08-16 16:20:38 +03:00
Modularize grep.kak, make.kak and jump.kak
This commit is contained in:
parent
2b9b74091d
commit
9cc2f47e31
@ -1,8 +1,10 @@
|
||||
# require-module jump
|
||||
|
||||
declare-option -docstring "shell command run to search for subtext in a file/directory" \
|
||||
str grepcmd 'grep -RHn'
|
||||
|
||||
provide-module grep %{
|
||||
|
||||
require-module jump
|
||||
|
||||
define-command -params .. -docstring %{
|
||||
grep [<arguments>]: grep utility wrapper
|
||||
All optional arguments are forwarded to the grep utility
|
||||
@ -58,3 +60,7 @@ define-command grep-next-match -docstring %{alias for "jump-next *grep*"} %{
|
||||
define-command grep-previous-match -docstring %{alias for "jump-previous *grep*"} %{
|
||||
jump-previous *grep*
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
hook -once global KakBegin .* %{ require-module grep }
|
||||
|
@ -1,10 +1,10 @@
|
||||
provide-module jump %§§
|
||||
|
||||
declare-option -docstring "name of the client in which all source code jumps will be executed" \
|
||||
str jumpclient
|
||||
declare-option -docstring "name of the client in which utilities display information" \
|
||||
str toolsclient
|
||||
|
||||
provide-module jump %{
|
||||
|
||||
declare-option -hidden int jump_current_line 0
|
||||
|
||||
define-command -hidden jump %{
|
||||
@ -64,3 +64,7 @@ define-command -hidden jump-select-previous %{
|
||||
# See comment in jump-select-next
|
||||
execute-keys ge %opt{jump_current_line}g<a-h> <a-/>^[^:\n]+:\d+:<ret>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
hook -once global KakBegin .* %{ require-module jump }
|
||||
|
@ -1,11 +1,11 @@
|
||||
# require-module jump
|
||||
|
||||
declare-option -docstring "shell command run to build the project" \
|
||||
str makecmd make
|
||||
declare-option -docstring "pattern that describes lines containing information about errors in the output of the `makecmd` command. Capture groups must be: 1: filename 2: line number 3: optional column 4: optional error description" \
|
||||
regex make_error_pattern "^([^:\n]+):(\d+):(?:(\d+):)? (?:fatal )?error:([^\n]+)?"
|
||||
|
||||
provide-module make %{
|
||||
|
||||
require-module jump
|
||||
|
||||
define-command -params .. \
|
||||
-docstring %{
|
||||
@ -86,3 +86,7 @@ define-command make-next-error -docstring %{alias for "jump-next *make*"} %{
|
||||
define-command make-previous-error -docstring %{alias for "jump-previous *make*"} %{
|
||||
jump-previous *make*
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
hook -once global KakBegin .* %{ require-module make }
|
||||
|
Loading…
Reference in New Issue
Block a user