Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vi-words]

The tag has no usage guidance.

1
vote
3answers
45 views

What is the easiest way to select multiple words in visual mode?

If I have the cursor placed on "word1" and wanted to select "word1 word2 word3" (i.e. with no trailing space after "word3") what is the easiest command? word1 word2 word3 word4 I am currently using ...
1
vote
1answer
56 views

iskeyword with context

In the Clean language, identifiers consist of either all 'normal' characters ([a-zA-Z][a-zA-Z0-9_`]*) or all 'funky' characters ([~!@#$%^&*-=+:<>,./?|] and perhaps more). What I would like ...
0
votes
1answer
143 views

Inconsistent <cword>, <C-R><C-W>, and keyword behavior

I'm in a Ruby file, and because ! is not an iskeyword character, if I place the cursor on a call to mymethod! and attempt a tag lookup via C - ], Vim searches for mymethod (without the !). Adding ! to ...
0
votes
1answer
166 views

Prevent W from jumping to next line

Pressing W (as in Shift+w) when there is only one word in front of the cursor causes the cursor to immediately jump to the next line. This is unlike what happens when doing the reverse with B, where ...
0
votes
2answers
75 views

Ammend 'w' behavior - ignore operators and brackets - '(', '[' '{', '*', '+', '='

As the title says. Is it possible? Steps to reproduce: Type in sample(text) and put the cursor on the first character then press w. Expected behavior: Cursor moves to beginning of next word - text ...
4
votes
1answer
88 views

What are the rules for “w” word motion when characters are not in iskeyword?

If I have a shell script with code like ... chars+=('5') chars+=('6') ... chars+=('%') chars+=('&') ... and iskeyword is defined as iskeyword=@,48-57,_,192-255,- This definition indicates to ...
9
votes
2answers
2k views

Why do `cw` and `ce` do the same thing?

This has always bugged me about the w and W motion commands—they seem to work differently when used with the change command than they do when used alone, or with the delete command. For example, with ...