@@ -285,17 +285,17 @@ Specification for input surrounding has a structure of composed pattern
285
285
arguments and should return one of:
286
286
- Composed pattern. Useful for implementing user input. Example of
287
287
simplified variant of input surrounding for function call with
288
- name taken from user prompt:
289
- >
288
+ name taken from user prompt: >
289
+
290
290
function()
291
291
local left_edge = vim.pesc(vim.fn.input('Function name: '))
292
292
return { string.format('%s+%%b()', left_edge), '^.-%(().*()%)$' }
293
293
end
294
294
<
295
295
- Single region pair (see | MiniSurround-glossary | ). Useful to allow
296
296
full control over surrounding. Will be taken as is. Example of
297
- returning first and last lines of a buffer:
298
- >
297
+ returning first and last lines of a buffer: >
298
+
299
299
function()
300
300
local n_lines = vim.fn.line('$')
301
301
return {
@@ -315,8 +315,8 @@ Specification for input surrounding has a structure of composed pattern
315
315
best region pair will be picked in the same manner as with composed
316
316
pattern (respecting options `n_lines` , `search_method` , etc.) using
317
317
output region (from start of left region to end of right region).
318
- Example using edges of "best" line with display width more than 80:
319
- >
318
+ Example using edges of "best" line with display width more than 80: >
319
+
320
320
function()
321
321
local make_line_region_pair = function(n)
322
322
local left = { line = n, col = 1 }
@@ -343,8 +343,8 @@ Specification for input surrounding has a structure of composed pattern
343
343
!IMPORTANT NOTE!: it means that output's `from` shouldn't be strictly
344
344
to the left of `init` (it will lead to infinite loop). Not allowed as
345
345
last item (as it should be pattern with captures).
346
- Example of matching only balanced parenthesis with big enough width:
347
- >
346
+ Example of matching only balanced parenthesis with big enough width: >
347
+
348
348
{
349
349
'%b()',
350
350
function(s, init)
@@ -353,7 +353,7 @@ Specification for input surrounding has a structure of composed pattern
353
353
end,
354
354
'^.().*().$'
355
355
}
356
- >
356
+ <
357
357
More examples:
358
358
- See | MiniSurround.gen_spec | for function wrappers to create commonly used
359
359
surrounding specifications.
@@ -769,8 +769,7 @@ Example configuration for function definition textobject with
769
769
f = ts_input({ outer = '@call.outer', inner = '@call.inner' }),
770
770
}
771
771
})
772
- >
773
-
772
+ <
774
773
Notes:
775
774
- By default query is done using 'nvim-treesitter' plugin if it is present
776
775
(falls back to builtin methods otherwise). This allows for a more
0 commit comments