Skip to content

Commit

Permalink
vim: use <leader>sa for parameter swapping
Browse files Browse the repository at this point in the history
Otherwise it conflicts with tabularize.

Also difine a ]s, [s movement, though it doesn't work yet:
nvim-treesitter/nvim-treesitter-textobjects#604.
  • Loading branch information
aktau committed Nov 18, 2024
1 parent 4934026 commit 9759be5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -480,28 +480,28 @@ if has('nvim')
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
["]S"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
["[s"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
["[S"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
['<leader>sa'] = '@parameter.inner', -- [S]wap next [A]rgument.
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
['<leader>sA'] = '@parameter.inner', -- [S]wap previous [A]rgument.
},
},
},
Expand Down

0 comments on commit 9759be5

Please sign in to comment.