7
1
From normal mode I select what's before the cursor with:
v<Home>
Is adding to the selection what's under the cursor possible?
Thanks!!
7
1
From normal mode I select what's before the cursor with:
v<Home>
Is adding to the selection what's under the cursor possible?
Thanks!!
15
edit
You want to change the direction of the selection, right? Just type o
and extend your selection as you need.
lorem ipsum dolor sit amet
# " starting point
<######## " v^
########> " o
##########> " e
endedit
I'm not exactly sure about what you want so here are a bunch of selection combos.
Select from cursor to first column of the line:
v0
Select from cursor to first printable character of the line:
v^
Select from cursor to end of the line:
v$
Select from cursor to end of the word:
ve
Select from cursor to beginning of the word:
vb
Select from cursor to the next opening parenthesis on the line (inclusive):
vf(
Select from cursor to the previous double quote on the line (exclusive):
vT"
Select from cursor to the next occurence of foo
in the buffer (always exclusive):
v/foo<CR>
Select from cursor to previous occurence of bar
in the buffer (always exclusive):
v?bar<CR>
Select the whole word under cursor:
viw
Select everything between a pair of parenthesis:
vi( (or vib)
Select the body of a function:
vi{ (or viB)
Select a whole sentence:
vis
Select a whole paragraph:
vip
For even more, see :help motion.txt
.
1At least over here, both
v<Home>
andv^
select what's under the cursor as well. Do you want to select the character to the right of the cursor as well? If so,lv^
may suffice! – Phoshi – 2012-08-18T19:30:16.733