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
2
2
3
3
==============================================================================
4
4
Table of Contents *cursor-text-objects-table-of-contents*
@@ -8,11 +8,12 @@ Table of Contents *cursor-text-objects-table-of-contents*
8
8
- Summary | cursor-text-objects-how-to-use-summary |
9
9
- Details | cursor-text-objects-how-to-use-details |
10
10
3. 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 |
12
13
- Initialization | cursor-text-objects-tests-initialization |
13
14
- 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 |
16
17
17
18
==============================================================================
18
19
1. 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!
127
128
128
129
129
130
==============================================================================
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*
131
165
132
166
133
167
INITIALIZATION *cursor-text-objects-tests-initialization*
@@ -159,7 +193,7 @@ Run test based on tags
159
193
160
194
161
195
==============================================================================
162
- 5 . Tracking Updates *cursor-text-objects-tracking-updates*
196
+ 6 . Tracking Updates *cursor-text-objects-tracking-updates*
163
197
164
198
See doc/news.txt <doc/news.txt> for updates.
165
199
@@ -171,7 +205,7 @@ You can watch this plugin for changes by adding this URL to your RSS feed:
171
205
172
206
173
207
==============================================================================
174
- 6 . Other Plugins *cursor-text-objects-other-plugins*
208
+ 7 . Other Plugins *cursor-text-objects-other-plugins*
175
209
176
210
This plugin is a sort-of successor to vim-ninja-feet
177
211
<https://github.com/tommcdo/vim-ninja-feet > with some notable differences
0 commit comments