2 Angajamente 9fbcdd52d9 ... 936522a847

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  Thomas Dy 936522a847 nixpkgs/neovim: enable mini.operators 1 lună în urmă
  Thomas Dy 9fbcdd52d9 nixpkgs/neovim: enable mini.operators 1 lună în urmă

+ 9 - 2
.config/nixpkgs/neovim/config/lua/user/plugins/editing.lua

@@ -72,8 +72,8 @@ MiniOperators.setup({
   -- disable evaluate mapping
   evaluate = { prefix = '' },
 
-  -- use cp motion to change and paste
-  replace = { prefix = 'cp' },
+  -- custom mapping defined later
+  replace = { prefix = '' },
 
   -- other mappings
   -- gm - multiply
@@ -81,6 +81,13 @@ MiniOperators.setup({
   -- 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