From 819494b4bba3763a23b32596e7a22e329c2ca1c6 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sat, 5 Feb 2022 09:23:41 +0530 Subject: [PATCH] nvim: after/plugin/word-column: Change default mappings for textobj-word-column We want to use vim-textobj-comment and hence need to make the ac mapping available. --- nvim/.config/nvim/after/plugin/word-column.vim | 10 ++++++++++ nvim/.config/nvim/init.lua | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 nvim/.config/nvim/after/plugin/word-column.vim diff --git a/nvim/.config/nvim/after/plugin/word-column.vim b/nvim/.config/nvim/after/plugin/word-column.vim new file mode 100644 index 0000000..7bf6edb --- /dev/null +++ b/nvim/.config/nvim/after/plugin/word-column.vim @@ -0,0 +1,10 @@ +call textobj#user#map('wordcolumn', { + \ 'word' : { + \ 'select-i' : 'iq', + \ 'select-a' : 'aq', + \ }, + \ 'WORD' : { + \ 'select-i' : 'iQ', + \ 'select-a' : 'aQ', + \ }, + \ }) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 7fd844f..81fa5e4 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -76,6 +76,9 @@ vim.g.dispatch_no_maps = 1 vim.g.matchup_matchparen_offscreen = {} vim.g.matchup_surround_enabled = 1 +-- textobj-word-column +vim.g.textobj_wordcolumn_no_default_key_mappings = 1 + -- We do this to prevent the loading of the system fzf.vim plugin. This is -- present at least on Arch/Manjaro vim.api.nvim_command('set rtp-=/usr/share/vim/vimfiles')