From e9243f743e1abe4d057b7beb5de0cadda9e9eaa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Sat, 30 May 2026 23:40:29 -0300 Subject: [PATCH] feat(client): add per-subgroup Vim mapping opt-out globals The plain-Vim ftplugin only exposed a whole-layer g:nuwiki_no_default_mappings gate, so Vim users could not drop a single keymap group the way Neovim users can via mappings. = false. Add g:nuwiki_no_{wiki_prefix,links,lists,headers,table_editing,diary, html_export,text_objects}_mappings, each wrapping its group block, to reach parity with lua/nuwiki/keymaps.lua. Cover them with a dedicated opt-out harness and document them in the README and help file. Co-Authored-By: Claude Opus 4.7 --- README.md | 18 +- development/tests/test-keymaps-vim-optout.vim | 73 ++++++ development/tests/test-keymaps-vim.sh | 39 +++- doc/nuwiki.txt | 29 ++- ftplugin/vimwiki.vim | 213 ++++++++++-------- 5 files changed, 269 insertions(+), 103 deletions(-) create mode 100644 development/tests/test-keymaps-vim-optout.vim diff --git a/README.md b/README.md index 04c8e8b..e10752b 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,8 @@ let g:nuwiki_link_severity = 'warn' " 'off'|'hint'|'warn'|'error' let g:nuwiki_no_default_mappings = 0 " set to 1 to skip the keymap layer let g:nuwiki_no_folding = 0 " set to 1 to skip foldexpr setup let g:nuwiki_mouse_mappings = 0 " set to 1 to enable mouse maps +" Drop individual keymap subgroups (mirror the Lua `mappings.` toggles): +" g:nuwiki_no_{wiki_prefix,links,lists,headers,table_editing,diary,html_export,text_objects}_mappings ``` ### Reference @@ -337,7 +339,15 @@ For users configuring without Lua. | `g:nuwiki_file_extension` | `'.wiki'` | wiki file extension | | `g:nuwiki_log_level` | `'warn'` | `error` \| `warn` \| `info` \| `debug` | | `g:nuwiki_link_severity` | `'warn'` | broken-link severity: `off` \| `hint` \| `warn` \| `error` | -| `g:nuwiki_no_default_mappings` | `0` | `1` skips the keymap layer | +| `g:nuwiki_no_default_mappings` | `0` | `1` skips the whole keymap layer | +| `g:nuwiki_no_wiki_prefix_mappings` | `0` | `1` skips the `w*` group | +| `g:nuwiki_no_links_mappings` | `0` | `1` skips the link group (``, `+`, …) | +| `g:nuwiki_no_lists_mappings` | `0` | `1` skips the list group (``, `gl*`, `o`/`O`, …) | +| `g:nuwiki_no_headers_mappings` | `0` | `1` skips the header group (`=`, `-`, `]]`, …) | +| `g:nuwiki_no_table_editing_mappings` | `0` | `1` skips the table group (`gqq`, ``, insert ``) | +| `g:nuwiki_no_diary_mappings` | `0` | `1` skips the diary nav group (``, ``) | +| `g:nuwiki_no_html_export_mappings` | `0` | `1` skips the HTML export group (`wh*`) | +| `g:nuwiki_no_text_objects_mappings` | `0` | `1` skips the text-object group (`ah`, `il`, …) | | `g:nuwiki_no_folding` | `0` | `1` skips foldexpr setup | | `g:nuwiki_mouse_mappings` | `0` | `1` enables mouse maps | @@ -443,8 +453,10 @@ instead. ### Default keymaps -All buffer-local. Disable any group via `mappings. = false` in -Neovim, or `let g:nuwiki_no_default_mappings = 1` in Vim. +All buffer-local. Disable the whole layer via `mappings.enabled = false` in +Neovim, or `let g:nuwiki_no_default_mappings = 1` in Vim. Drop a single group +via `mappings. = false` in Neovim, or +`let g:nuwiki_no__mappings = 1` in Vim. **Links** (normal mode) diff --git a/development/tests/test-keymaps-vim-optout.vim b/development/tests/test-keymaps-vim-optout.vim new file mode 100644 index 0000000..eac8fb3 --- /dev/null +++ b/development/tests/test-keymaps-vim-optout.vim @@ -0,0 +1,73 @@ +" development/tests/test-keymaps-vim-optout.vim — driven by +" development/tests/test-keymaps-vim.sh. +" +" Per-subgroup mapping opt-out regression. The shell driver sets a subset +" of `g:nuwiki_no__mappings = 1` globals *before* the ftplugin loads, +" so this harness asserts that the disabled groups leave no buffer-local +" mappings while the still-enabled groups keep theirs. Mirrors the Lua-side +" subgroup toggles in lua/nuwiki/keymaps.lua. + +let s:results = [] +let s:pass = 0 +let s:fail = 0 +let s:out = $NUWIKI_KEYMAP_RESULTS + +function! s:record(ok, name, detail) abort + let l:line = (a:ok ? 'PASS' : 'FAIL') . ' ' . a:name + if a:detail !=# '' + let l:line .= ' — ' . a:detail + endif + call add(s:results, l:line) + if a:ok + let s:pass += 1 + else + let s:fail += 1 + endif +endfunction + +function! s:has_map(lhs, mode) abort + let l:d = maparg(a:lhs, a:mode, 0, 1) + return !empty(l:d) && get(l:d, 'buffer', 0) +endfunction + +" Groups the driver disabled (g:nuwiki_no__mappings = 1): every +" representative LHS below must be ABSENT. +let s:disabled = [ + \ ['wiki_prefix', 'ww', 'n'], + \ ['wiki_prefix', 'ww', 'n'], + \ ['links', '', 'n'], + \ ['links', '+', 'n'], + \ ['links', 'wr', 'n'], + \ ['headers', '=', 'n'], + \ ['headers', ']]', 'n'], + \ ['headers', ']u', 'n'], + \ ['text_objects', 'ah', 'x'], + \ ['text_objects', 'il', 'o'], + \ ] +for s:e in s:disabled + let s:ok = !s:has_map(s:e[1], s:e[2]) + call s:record(s:ok ? 1 : 0, 'optout.' . s:e[0] . '.' . s:e[2] . '.' . s:e[1], + \ s:ok ? '' : s:e[1] . ' (' . s:e[2] . ') still mapped despite opt-out') +endfor + +" Groups left enabled: every representative LHS must still be PRESENT. +let s:enabled = [ + \ ['lists', 'gln', 'n'], + \ ['lists', 'gnt', 'n'], + \ ['lists', '', 'n'], + \ ['diary', '', 'n'], + \ ['table_editing', 'gqq', 'n'], + \ ['table_editing', '', 'n'], + \ ['html_export', 'wh', 'n'], + \ ['html_export', 'wha', 'n'], + \ ] +for s:e in s:enabled + let s:ok = s:has_map(s:e[1], s:e[2]) + call s:record(s:ok ? 1 : 0, 'kept.' . s:e[0] . '.' . s:e[2] . '.' . s:e[1], + \ s:ok ? '' : s:e[1] . ' (' . s:e[2] . ') unexpectedly absent') +endfor + +call add(s:results, '') +call add(s:results, printf('SUMMARY: %d passed, %d failed', s:pass, s:fail)) +call writefile(s:results, s:out) +execute (s:fail == 0 ? 'qall!' : 'cquit!') diff --git a/development/tests/test-keymaps-vim.sh b/development/tests/test-keymaps-vim.sh index b816ad5..ec8f5da 100755 --- a/development/tests/test-keymaps-vim.sh +++ b/development/tests/test-keymaps-vim.sh @@ -59,7 +59,44 @@ fi cat "$RESULTS" -if grep -qE '^SUMMARY: [0-9]+ passed, 0 failed' "$RESULTS"; then +if ! grep -qE '^SUMMARY: [0-9]+ passed, 0 failed' "$RESULTS"; then + exit 1 +fi + +# ===== Per-subgroup opt-out run ===== +# Fresh Vim instance with a subset of g:nuwiki_no__mappings set +# *before* the ftplugin loads, so we can assert the disabled groups drop +# their bindings while the rest survive. + +VIMRC_OPTOUT="$TMP/vimrc-optout" +cat > "$VIMRC_OPTOUT" <"$TMP/vim-optout.log" 2>&1 || true + +if [[ ! -f "$RESULTS_OPTOUT" ]]; then + echo 'keymap opt-out harness produced no output' >&2 + echo '--- vim log ---' >&2 + cat "$TMP/vim-optout.log" >&2 || true + exit 1 +fi + +cat "$RESULTS_OPTOUT" + +if grep -qE '^SUMMARY: [0-9]+ passed, 0 failed' "$RESULTS_OPTOUT"; then exit 0 fi exit 1 diff --git a/doc/nuwiki.txt b/doc/nuwiki.txt index 47435ad..c8f3079 100644 --- a/doc/nuwiki.txt +++ b/doc/nuwiki.txt @@ -207,6 +207,28 @@ Vim-specific globals ~ When 1, the Vim path skips every buffer-local keymap. Equivalent to `mappings.enabled = false` in Neovim. + *g:nuwiki_no_wiki_prefix_mappings* + *g:nuwiki_no_links_mappings* + *g:nuwiki_no_lists_mappings* + *g:nuwiki_no_headers_mappings* + *g:nuwiki_no_table_editing_mappings* + *g:nuwiki_no_diary_mappings* + *g:nuwiki_no_html_export_mappings* + *g:nuwiki_no_text_objects_mappings* +`g:nuwiki_no__mappings` 0 + Per-subgroup opt-outs, each defaulting to 0. Setting one to 1 drops just + that group's buffer-local keymaps while leaving the rest in place; the + whole-layer |g:nuwiki_no_default_mappings| still wins over all of them. + These mirror the Lua-side `mappings.` booleans. Valid groups: + `wiki_prefix` `w*` + `links` ``, ``, ``, ``, `+`, … + `lists` ``, `gl*`, `o`/`O`, insert-mode list edits + `headers` `=`, `-`, `]]`, `[[`, `]=`, `[=`, `]u`, `[u` + `table_editing` `gqq`, ``, ``, insert `` + `diary` ``, `` + `html_export` `wh`, `whh`, `wha` + `text_objects` `ah`, `ih`, `al`, `il`, `a\`, `i\`, `ac`, `ic` + *g:nuwiki_no_folding* `g:nuwiki_no_folding` 0 When 1, the Vim path skips `foldexpr` / `foldmethod` setup. @@ -378,8 +400,11 @@ Other ~ ============================================================================== 6. KEYMAPS *nuwiki-keymaps* -Every keymap is buffer-local. Disable a group via `mappings. = -false` in Neovim, or `let g:nuwiki_no_default_mappings = 1` in Vim. +Every keymap is buffer-local. Disable the whole layer via +`mappings.enabled = false` in Neovim, or `let g:nuwiki_no_default_mappings += 1` in Vim. Drop a single group via `mappings. = false` in Neovim, +or `let g:nuwiki_no__mappings = 1` in Vim (see +|g:nuwiki_no_links_mappings| for the group list). Links (normal mode) ~ diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim index fc580fa..dd33141 100644 --- a/ftplugin/vimwiki.vim +++ b/ftplugin/vimwiki.vim @@ -171,90 +171,103 @@ if !has('nvim') " ===== Default key mappings (parity with upstream vimwiki) ===== " - " Users can opt out by setting `g:nuwiki_no_default_mappings = 1` - " (whole layer) or by adding their own competing buffer-local maps. + " Users can opt out of the whole layer with `g:nuwiki_no_default_mappings = 1`, + " or flip individual subgroups off via `g:nuwiki_no__mappings = 1` + " (group ∈ wiki_prefix, links, lists, headers, table_editing, diary, + " html_export, text_objects). These mirror the Lua-side `mappings.` + " toggles in lua/nuwiki/keymaps.lua. if !get(g:, 'nuwiki_no_default_mappings', 0) " Wiki prefix - nnoremap ww :call nuwiki#commands#wiki_index(0) - nnoremap wt :call nuwiki#commands#wiki_tab_index(0) - nnoremap ws :call nuwiki#commands#wiki_ui_select() - nnoremap wi :call nuwiki#commands#diary_index() - nnoremap ww :call nuwiki#commands#diary_today() - nnoremap wy :call nuwiki#commands#diary_yesterday() - nnoremap wt :call nuwiki#commands#diary_tomorrow() - nnoremap wm :call nuwiki#commands#diary_tomorrow() - nnoremap wi :call nuwiki#commands#diary_generate_index() + if !get(g:, 'nuwiki_no_wiki_prefix_mappings', 0) + nnoremap ww :call nuwiki#commands#wiki_index(0) + nnoremap wt :call nuwiki#commands#wiki_tab_index(0) + nnoremap ws :call nuwiki#commands#wiki_ui_select() + nnoremap wi :call nuwiki#commands#diary_index() + nnoremap ww :call nuwiki#commands#diary_today() + nnoremap wy :call nuwiki#commands#diary_yesterday() + nnoremap wt :call nuwiki#commands#diary_tomorrow() + nnoremap wm :call nuwiki#commands#diary_tomorrow() + nnoremap wi :call nuwiki#commands#diary_generate_index() + endif " Links - nnoremap :call nuwiki#commands#follow_link_or_create() - nnoremap :split:call nuwiki#commands#follow_link_or_create() - nnoremap :vsplit:call nuwiki#commands#follow_link_or_create() - nnoremap :tabnew:call nuwiki#commands#follow_link_or_create() - nnoremap - nnoremap /\[\[:nohlsearch - nnoremap ?\[\[:nohlsearch - nnoremap + :call nuwiki#commands#normalize_link() - xnoremap + :call nuwiki#commands#normalize_link() - nnoremap wn :call nuwiki#commands#wiki_goto_page('') - nnoremap wd :call nuwiki#commands#delete_file() - nnoremap wr :call nuwiki#commands#rename_file() - nnoremap wc :call nuwiki#commands#colorize('') - xnoremap wc :call nuwiki#commands#colorize('') + if !get(g:, 'nuwiki_no_links_mappings', 0) + nnoremap :call nuwiki#commands#follow_link_or_create() + nnoremap :split:call nuwiki#commands#follow_link_or_create() + nnoremap :vsplit:call nuwiki#commands#follow_link_or_create() + nnoremap :tabnew:call nuwiki#commands#follow_link_or_create() + nnoremap + nnoremap /\[\[:nohlsearch + nnoremap ?\[\[:nohlsearch + nnoremap + :call nuwiki#commands#normalize_link() + xnoremap + :call nuwiki#commands#normalize_link() + nnoremap wn :call nuwiki#commands#wiki_goto_page('') + nnoremap wd :call nuwiki#commands#delete_file() + nnoremap wr :call nuwiki#commands#rename_file() + nnoremap wc :call nuwiki#commands#colorize('') + xnoremap wc :call nuwiki#commands#colorize('') + endif " Diary nav - nnoremap :call nuwiki#commands#diary_next() - nnoremap :call nuwiki#commands#diary_prev() + if !get(g:, 'nuwiki_no_diary_mappings', 0) + nnoremap :call nuwiki#commands#diary_next() + nnoremap :call nuwiki#commands#diary_prev() + endif " Lists - nnoremap :call nuwiki#commands#toggle_list_item() - xnoremap :call nuwiki#commands#toggle_list_item() - nnoremap :call nuwiki#commands#toggle_list_item() - xnoremap :call nuwiki#commands#toggle_list_item() - nnoremap :call nuwiki#commands#toggle_list_item() - xnoremap :call nuwiki#commands#toggle_list_item() - nnoremap gnt :call nuwiki#commands#next_task() - nnoremap gln :call nuwiki#commands#cycle_list_item() - xnoremap gln :call nuwiki#commands#cycle_list_item() - nnoremap glp :call nuwiki#commands#cycle_list_item_back() - xnoremap glp :call nuwiki#commands#cycle_list_item_back() - nnoremap glx :call nuwiki#commands#reject_list_item() - xnoremap glx :call nuwiki#commands#reject_list_item() - nnoremap glh :call nuwiki#commands#list_change_level(-1, 0) - nnoremap gll :call nuwiki#commands#list_change_level(1, 0) - nnoremap gLh :call nuwiki#commands#list_change_level(-1, 1) - nnoremap gLl :call nuwiki#commands#list_change_level(1, 1) - nnoremap glr :call nuwiki#commands#list_renumber() - nnoremap gLr :call nuwiki#commands#list_renumber_all() - nnoremap gl :call nuwiki#commands#list_remove_done() - nnoremap gL :call nuwiki#commands#list_remove_done_all() - nnoremap o :call nuwiki#commands#open_below_with_bullet() - nnoremap O :call nuwiki#commands#open_above_with_bullet() + if !get(g:, 'nuwiki_no_lists_mappings', 0) + nnoremap :call nuwiki#commands#toggle_list_item() + xnoremap :call nuwiki#commands#toggle_list_item() + nnoremap :call nuwiki#commands#toggle_list_item() + xnoremap :call nuwiki#commands#toggle_list_item() + nnoremap :call nuwiki#commands#toggle_list_item() + xnoremap :call nuwiki#commands#toggle_list_item() + nnoremap gnt :call nuwiki#commands#next_task() + nnoremap gln :call nuwiki#commands#cycle_list_item() + xnoremap gln :call nuwiki#commands#cycle_list_item() + nnoremap glp :call nuwiki#commands#cycle_list_item_back() + xnoremap glp :call nuwiki#commands#cycle_list_item_back() + nnoremap glx :call nuwiki#commands#reject_list_item() + xnoremap glx :call nuwiki#commands#reject_list_item() + nnoremap glh :call nuwiki#commands#list_change_level(-1, 0) + nnoremap gll :call nuwiki#commands#list_change_level(1, 0) + nnoremap gLh :call nuwiki#commands#list_change_level(-1, 1) + nnoremap gLl :call nuwiki#commands#list_change_level(1, 1) + nnoremap glr :call nuwiki#commands#list_renumber() + nnoremap gLr :call nuwiki#commands#list_renumber_all() + nnoremap gl :call nuwiki#commands#list_remove_done() + nnoremap gL :call nuwiki#commands#list_remove_done_all() + nnoremap o :call nuwiki#commands#open_below_with_bullet() + nnoremap O :call nuwiki#commands#open_above_with_bullet() - " Insert-mode list editing (vimwiki parity). - inoremap :call nuwiki#commands#list_change_level(-1, 0) - inoremap :call nuwiki#commands#list_change_level(1, 0) - inoremap :call nuwiki#commands#list_cycle_symbol(1) - inoremap :call nuwiki#commands#list_cycle_symbol(-1) - inoremap :call nuwiki#commands#list_toggle_or_add_checkbox() - inoremap nuwiki#commands#smart_return() - inoremap nuwiki#commands#smart_tab() - inoremap nuwiki#commands#smart_shift_tab() + " Insert-mode list editing (vimwiki parity). + inoremap :call nuwiki#commands#list_change_level(-1, 0) + inoremap :call nuwiki#commands#list_change_level(1, 0) + inoremap :call nuwiki#commands#list_cycle_symbol(1) + inoremap :call nuwiki#commands#list_cycle_symbol(-1) + inoremap :call nuwiki#commands#list_toggle_or_add_checkbox() + inoremap nuwiki#commands#smart_return() + endif " Headers - nnoremap = :call nuwiki#commands#heading_add() - nnoremap - :call nuwiki#commands#heading_remove() - nnoremap ]] :call nuwiki#commands#next_header() - nnoremap [[ :call nuwiki#commands#prev_header() - nnoremap ]= :call nuwiki#commands#next_sibling_header() - nnoremap [= :call nuwiki#commands#prev_sibling_header() - nnoremap ]u :call nuwiki#commands#parent_header() - nnoremap [u :call nuwiki#commands#parent_header() + if !get(g:, 'nuwiki_no_headers_mappings', 0) + nnoremap = :call nuwiki#commands#heading_add() + nnoremap - :call nuwiki#commands#heading_remove() + nnoremap ]] :call nuwiki#commands#next_header() + nnoremap [[ :call nuwiki#commands#prev_header() + nnoremap ]= :call nuwiki#commands#next_sibling_header() + nnoremap [= :call nuwiki#commands#prev_sibling_header() + nnoremap ]u :call nuwiki#commands#parent_header() + nnoremap [u :call nuwiki#commands#parent_header() + endif " HTML export - nnoremap wh :call nuwiki#commands#export_current() - nnoremap whh :call nuwiki#commands#export_browse() - nnoremap wha :call nuwiki#commands#export_all() + if !get(g:, 'nuwiki_no_html_export_mappings', 0) + nnoremap wh :call nuwiki#commands#export_current() + nnoremap whh :call nuwiki#commands#export_browse() + nnoremap wha :call nuwiki#commands#export_all() + endif " Mouse (opt-in via g:nuwiki_mouse_mappings = 1). if get(g:, 'nuwiki_mouse_mappings', 0) @@ -265,13 +278,17 @@ if !has('nvim') nnoremap endif - " Tables - nnoremap gqq :call nuwiki#commands#table_align() - nnoremap gq1 :call nuwiki#commands#table_align() - nnoremap gww :call nuwiki#commands#table_align() - nnoremap gw1 :call nuwiki#commands#table_align() - nnoremap :call nuwiki#commands#table_move_left() - nnoremap :call nuwiki#commands#table_move_right() + " Tables (and insert-mode table-cell navigation, same surface). + if !get(g:, 'nuwiki_no_table_editing_mappings', 0) + nnoremap gqq :call nuwiki#commands#table_align() + nnoremap gq1 :call nuwiki#commands#table_align() + nnoremap gww :call nuwiki#commands#table_align() + nnoremap gw1 :call nuwiki#commands#table_align() + nnoremap :call nuwiki#commands#table_move_left() + nnoremap :call nuwiki#commands#table_move_right() + inoremap nuwiki#commands#smart_tab() + inoremap nuwiki#commands#smart_shift_tab() + endif " Folding — heading-block fold structure (matches lua/nuwiki/folding.lua). " Opt-out via `let g:nuwiki_no_folding = 1` (mirrors the Lua-side @@ -290,26 +307,28 @@ if !has('nvim') " Text objects — vimwiki parity (matches lua/nuwiki/textobjects.lua). " The `:` clears any prefix count and the visual mode; the " autoload function re-establishes the selection at the right range. - xnoremap ah :call nuwiki#textobjects#heading(0, 0) - onoremap ah :call nuwiki#textobjects#heading(0, 0) - xnoremap ih :call nuwiki#textobjects#heading(1, 0) - onoremap ih :call nuwiki#textobjects#heading(1, 0) - xnoremap aH :call nuwiki#textobjects#heading(0, 1) - onoremap aH :call nuwiki#textobjects#heading(0, 1) - xnoremap iH :call nuwiki#textobjects#heading(1, 1) - onoremap iH :call nuwiki#textobjects#heading(1, 1) - xnoremap al :call nuwiki#textobjects#list_item(0) - onoremap al :call nuwiki#textobjects#list_item(0) - xnoremap il :call nuwiki#textobjects#list_item(1) - onoremap il :call nuwiki#textobjects#list_item(1) - xnoremap a\ :call nuwiki#textobjects#table_cell(0) - onoremap a\ :call nuwiki#textobjects#table_cell(0) - xnoremap i\ :call nuwiki#textobjects#table_cell(1) - onoremap i\ :call nuwiki#textobjects#table_cell(1) - xnoremap ac :call nuwiki#textobjects#table_column(0) - onoremap ac :call nuwiki#textobjects#table_column(0) - xnoremap ic :call nuwiki#textobjects#table_column(1) - onoremap ic :call nuwiki#textobjects#table_column(1) + if !get(g:, 'nuwiki_no_text_objects_mappings', 0) + xnoremap ah :call nuwiki#textobjects#heading(0, 0) + onoremap ah :call nuwiki#textobjects#heading(0, 0) + xnoremap ih :call nuwiki#textobjects#heading(1, 0) + onoremap ih :call nuwiki#textobjects#heading(1, 0) + xnoremap aH :call nuwiki#textobjects#heading(0, 1) + onoremap aH :call nuwiki#textobjects#heading(0, 1) + xnoremap iH :call nuwiki#textobjects#heading(1, 1) + onoremap iH :call nuwiki#textobjects#heading(1, 1) + xnoremap al :call nuwiki#textobjects#list_item(0) + onoremap al :call nuwiki#textobjects#list_item(0) + xnoremap il :call nuwiki#textobjects#list_item(1) + onoremap il :call nuwiki#textobjects#list_item(1) + xnoremap a\ :call nuwiki#textobjects#table_cell(0) + onoremap a\ :call nuwiki#textobjects#table_cell(0) + xnoremap i\ :call nuwiki#textobjects#table_cell(1) + onoremap i\ :call nuwiki#textobjects#table_cell(1) + xnoremap ac :call nuwiki#textobjects#table_column(0) + onoremap ac :call nuwiki#textobjects#table_column(0) + xnoremap ic :call nuwiki#textobjects#table_column(1) + onoremap ic :call nuwiki#textobjects#table_column(1) + endif endif finish