1- *cursor-text-objects.txt* For Neovim >= 0.8.0 Last change: 2024 November 23
1+ *cursor-text-objects.txt* For Neovim >= 0.8.0 Last change: 2024 November 25
22
33==============================================================================
44Table of Contents *cursor-text-objects-table-of-contents*
@@ -8,11 +8,12 @@ Table of Contents *cursor-text-objects-table-of-contents*
88 - Summary | cursor-text-objects-how-to-use-summary |
99 - Details | cursor-text-objects-how-to-use-details |
10103. Installation | cursor-text-objects-installation |
11- 4. Tests | cursor-text-objects-tests |
11+ 4. Disclaimer | cursor-text-objects-disclaimer |
12+ 5. Tests | cursor-text-objects-tests |
1213 - Initialization | cursor-text-objects-tests-initialization |
1314 - Running | cursor-text-objects-tests-running |
14- 5 . Tracking Updates | cursor-text-objects-tracking-updates |
15- 6 . Other Plugins | cursor-text-objects-other-plugins |
15+ 6 . Tracking Updates | cursor-text-objects-tracking-updates |
16+ 7 . Other Plugins | cursor-text-objects-other-plugins |
1617
1718==============================================================================
18191. cursor-text-objects.nvim *cursor-text-objects-cursor-text-objects.nvim*
@@ -127,7 +128,40 @@ Give your right-pinky a workout and install `cursor-text-objects.nvim` today!
127128
128129
129130==============================================================================
130- 4. Tests *cursor-text-objects-tests*
131+ 4. Disclaimer *cursor-text-objects-disclaimer*
132+
133+ The default recommended mappings, `[` and `]` , will not conflict with existing
134+ mappings. There’s a test script
135+ <https://gist.github.com/ColinKennedy/7e632f88570be89762b0ca8372769b72 > that
136+ verifies this.
137+
138+ However if you have another mapping like this:
139+
140+ `vim.keymap.set({'n', 'x', 'o'}, '[i', function() return "dd" end,
141+ {expr=true} )`
142+
143+ then you may be surprised that `d [ip` does not work.
144+
145+ In short while actually this is not a conflict, it can still be confusing for a
146+ you and you’ll want to remap `cursor - text- objects` or that other mapping /
147+ plug-in to avoid the issue.
148+
149+ More details on what is going on in this case ~
150+
151+ `cursor - text- objects` is a pending operator but the mapping above is a regular
152+ operator. A pending operator is a mapping that "waits for the user to keep
153+ typing more keys" but a regular operator executes immediately. So if you only
154+ have `cursor - text- objects` applied, `ip` is interpreted as "[i]nside
155+ [p]aragraph". But with the mapping above, `d [i ` executes immediately and then
156+ treats `p ` as the start of a new command. And `p ` as a standalone keymap means
157+ [p]ut. (See `:help put` for details).
158+
159+ So again this is all expected behavior but if you don’t want that to happen,
160+ you’re better off remapping `[i ` to something else.
161+
162+
163+ ==============================================================================
164+ 5. Tests *cursor-text-objects-tests*
131165
132166
133167INITIALIZATION *cursor-text-objects-tests-initialization*
@@ -159,7 +193,7 @@ Run test based on tags
159193
160194
161195==============================================================================
162- 5 . Tracking Updates *cursor-text-objects-tracking-updates*
196+ 6 . Tracking Updates *cursor-text-objects-tracking-updates*
163197
164198See doc/news.txt <doc/news.txt> for updates.
165199
@@ -171,7 +205,7 @@ You can watch this plugin for changes by adding this URL to your RSS feed:
171205
172206
173207==============================================================================
174- 6 . Other Plugins *cursor-text-objects-other-plugins*
208+ 7 . Other Plugins *cursor-text-objects-other-plugins*
175209
176210This plugin is a sort-of successor to vim-ninja-feet
177211<https://github.com/tommcdo/vim-ninja-feet > with some notable differences
0 commit comments