home: vim: add statement objects/moves
And document it.
This commit is contained in:
parent
a96fb22d4d
commit
ae7c2d921b
|
@ -4,10 +4,12 @@ local wk = require("which-key")
|
|||
local motions = {
|
||||
["]m"] = "Next method start",
|
||||
["]M"] = "Next method end",
|
||||
["]S"] = "Next statement start",
|
||||
["]]"] = "Next class start",
|
||||
["]["] = "Next class end",
|
||||
["[m"] = "Previous method start",
|
||||
["[M"] = "Previous method end",
|
||||
["[S"] = "Previous statement start",
|
||||
["[["] = "Previous class start",
|
||||
["[]"] = "Previous class end",
|
||||
}
|
||||
|
@ -22,6 +24,7 @@ local objects = {
|
|||
["af"] = "a function",
|
||||
["if"] = "inner function",
|
||||
["ak"] = "a comment",
|
||||
["aS"] = "a statement",
|
||||
}
|
||||
|
||||
wk.register(motions, { mode = "n" })
|
||||
|
|
|
@ -24,6 +24,7 @@ ts_config.setup({
|
|||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ak"] = "@comment.outer",
|
||||
["aS"] = "@statement.outer",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
|
@ -32,6 +33,7 @@ ts_config.setup({
|
|||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]S"] = "@statement.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
|
@ -40,6 +42,7 @@ ts_config.setup({
|
|||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[S"] = "@statement.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
|
|
Loading…
Reference in a new issue