|
@@ -1,6 +1,7 @@
|
|
|
local MiniAi = require('mini.ai')
|
|
|
local MiniAlign = require('mini.align')
|
|
|
local MiniComment = require('mini.comment')
|
|
|
+local MiniOperators = require('mini.operators')
|
|
|
local MiniPairs = require('mini.pairs')
|
|
|
local MiniSurround = require('mini.surround')
|
|
|
|
|
@@ -66,6 +67,27 @@ MiniPairs.setup({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+-- extra operators
|
|
|
+MiniOperators.setup({
|
|
|
+ -- disable evaluate mapping
|
|
|
+ evaluate = { prefix = '' },
|
|
|
+
|
|
|
+ -- custom mapping defined later
|
|
|
+ replace = { prefix = '' },
|
|
|
+
|
|
|
+ -- other mappings
|
|
|
+ -- gm - multiply
|
|
|
+ -- gs - sort
|
|
|
+ -- gx - exchange
|
|
|
+})
|
|
|
+
|
|
|
+MiniOperators.make_mappings('replace', {
|
|
|
+ textobject = 'cp',
|
|
|
+ line = 'cpp',
|
|
|
+ -- overrides default p mapping
|
|
|
+ selection = 'p',
|
|
|
+})
|
|
|
+
|
|
|
local function toggle_end_char(char)
|
|
|
local cursor = vim.api.nvim_win_get_cursor(0)
|
|
|
local row = cursor[1] - 1
|