aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-07-01 21:06:18 +0530
committerAkshay Nair <phenax5@gmail.com>2026-07-01 21:06:18 +0530
commit8ff33f448ead9dcfe87395a81302bb57d4124d7d (patch)
tree6d5ca57f6ed97e0e59bc99722f1f567f55e8bbbf /autoload
parentd60ddc467397f0074f21576ca8ea9e1b1b78a2bd (diff)
downloadkakoune-config-8ff33f448ead9dcfe87395a81302bb57d4124d7d.tar.gz
kakoune-config-8ff33f448ead9dcfe87395a81302bb57d4124d7d.zip
Add conflict marker object
Diffstat (limited to 'autoload')
-rw-r--r--autoload/cursor.kak3
-rw-r--r--autoload/git.kak11
-rw-r--r--autoload/refactor/javascript.kak6
3 files changed, 13 insertions, 7 deletions
diff --git a/autoload/cursor.kak b/autoload/cursor.kak
index 6a2e23f..2874c45 100644
--- a/autoload/cursor.kak
+++ b/autoload/cursor.kak
@@ -8,8 +8,7 @@ hook global ModeChange .*:insert:.* %{ try %{
unset-face window PrimaryCursorEol
} }
-# set-option global idle_timeout 100
-
+# Highlight cursor word
# hook global NormalIdle .* %{
# eval -draft %{ try %{
# exec ,<a-i>w <a-k>\A\w+\z<ret>
diff --git a/autoload/git.kak b/autoload/git.kak
index 775cf0d..1b58a6e 100644
--- a/autoload/git.kak
+++ b/autoload/git.kak
@@ -7,8 +7,6 @@ define-command gitui -params .. %{
}
declare-user-mode git
-declare-user-mode git-r
-declare-user-mode git-d
map global user g ': enter-user-mode git<ret>' -docstring 'Git mode'
map global git s ': gitui<ret>' -docstring 'Git tui'
map global git A ': git add %val{buffile}<ret>' -docstring 'Add file'
@@ -16,10 +14,16 @@ map global git m ': git-line-blame<ret>' -docstring 'Blame selection lines'
map global git M ': git-file-blame<ret>' -docstring 'Blame buffer file'
map global git l ': git-link<ret>' -docstring 'Open remote link to selection in file'
+# diff
+declare-user-mode git-d
map global git d ': enter-user-mode git-d<ret>' -docstring 'Diff mode'
map global git-d d ': git-open-diff<ret>' -docstring 'Open staged files'
map global git-d c ': git-open-commit<ret>' -docstring 'Open files changed in last commit'
+map global git-d x ': git-grep-conflict-markers<ret>' -docstring 'Find conflicts'
+define-command git-grep-conflict-markers %{ grep <<<< }
+# rebase
+declare-user-mode git-r
map global git r ': enter-user-mode git-r<ret>' -docstring 'Git re(base/set) mode'
map global git-r f ': git reset HEAD^1 -- %val{buffile}<ret>' -docstring 'Split file out of last commit'
@@ -28,6 +32,9 @@ map global git n ': git next-hunk<ret>' -docstring 'Next hunk'
map global git p ': git prev-hunk<ret>' -docstring 'Previous hunk'
map global git h ': git-toggle-diff<ret>' -docstring 'Toggle hunk indicators'
+# Objects
+map global object m %{c^[<lt>=]{4\,}[^\n]*\n,^[<gt>=]{4\,}[^\n]*\n<ret>} -docstring 'conflict markers'
+
set-option global git_diff_add_char "+"
set-option global git_diff_del_char "-"
set-option global git_diff_mod_char "~"
diff --git a/autoload/refactor/javascript.kak b/autoload/refactor/javascript.kak
index 514b883..7b60b2f 100644
--- a/autoload/refactor/javascript.kak
+++ b/autoload/refactor/javascript.kak
@@ -2,11 +2,11 @@ hook global BufSetOption filetype=(?:javascript|typescript|jsx|tsx) %{
map global refactor o ': js-test-toggle-it-state<ret>' -docstring 'Toggle it/it.only'
}
-# TODO: Doesnt work right. Switch to treesitter code mods
+# TODO: Use treesitter code mods?
define-command js-test-toggle-it-state %{
try %{
- execute-keys 'Z<a-;><a-i>imxsit\(<ret>cit.only(<esc>z'
+ execute-keys -draft '<a-;><a-i>imxsit\(<ret>cit.only(<esc>'
} catch %{
- execute-keys 'Z<a-;><a-i>imxsit\.only\(<ret>cit(<esc>z'
+ execute-keys -draft '<a-;><a-i>imxsit\.only\(<ret>cit(<esc>'
}
}