From 89ea7e9cf29d22adff729f7c36554e9ecfb41d7e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 10 Feb 2024 14:07:07 +0100 Subject: [PATCH] nvim: Switch to mini operators plugin Removed vim-exchange which, while an amazing functionality, is also exactly replicated in mini.nvim (along with even more operators). Uses slightly different mapping - not `cx` anymore but `gx`. But this actually makes sense and fits in well with my other g-prefixed operators (`gc` for comment and `ga` for align). It is also the prefix for the other additional operators supplied by mini.operators: `gs` for sorting text, `gm` for multiplying, `gr` for replacing, `g=` for evaluating. --- nvim/.config/nvim/lua/plugins/config/mini.lua | 4 +++- nvim/.config/nvim/lua/plugins/editing.lua | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/config/mini.lua b/nvim/.config/nvim/lua/plugins/config/mini.lua index 6275595..a23508f 100644 --- a/nvim/.config/nvim/lua/plugins/config/mini.lua +++ b/nvim/.config/nvim/lua/plugins/config/mini.lua @@ -1,3 +1,4 @@ +-- automatic callback to invoke 'mini.base16' when colorscheme file is changed local colorsfile = vim.fn.stdpath("state") .. "/colorscheme.lua" local function source_colors() if vim.fn.filereadable(colorsfile) == 1 then @@ -33,7 +34,8 @@ require("mini.indentscope").setup({ }) require("mini.map").setup() -require("mini.move").setup() -- has not hit stable yet +require("mini.move").setup() +require("mini.operators").setup() require("mini.pairs").setup() require("mini.trailspace").setup() diff --git a/nvim/.config/nvim/lua/plugins/editing.lua b/nvim/.config/nvim/lua/plugins/editing.lua index 67e08ed..6c41211 100644 --- a/nvim/.config/nvim/lua/plugins/editing.lua +++ b/nvim/.config/nvim/lua/plugins/editing.lua @@ -1,9 +1,4 @@ return { - -- adds exchange operator with cx. common use: cxiw . on 2 words to switch - { - "tommcdo/vim-exchange", - event = "InsertEnter", - }, -- Align tables and other alignable things { "junegunn/vim-easy-align",