Line text-object

4 Points

Romain Lafourcade Romain Lafourcade

8 years ago

These text-objects allow you to operate directly on the current line.

Example: dil, yal, etc.

" excludes newline
xnoremap il g_o0
onoremap il :<C-u>normal vil<CR>

" includes newline
xnoremap al $o0
onoremap al :<C-u>normal val<CR>

Martínez Ortiz Saúl Axel

Martínez Ortiz Saúl Axel 6 years ago

Very easy and useful

plitter

plitter 5 years ago

I've been thinking about creating a text object like this, but I want to exclude the whitespace in front of the line. ^og_ works excellent for that, thanks for the example!