Questions tagged [vi-words]
The vi-words tag has no usage guidance.
13 questions
0
votes
1
answer
50
views
How can I make w and b act like W and B to navigate big words (space delimited words)?
I navigate by big words much more often would like to just type w and b instead of W and B every time. I wonder if Vim has a setting for this.
1
vote
2
answers
25
views
Use Word for `*`/`#`
As a lot of people, I have removed _ from iskeyword, so it considers it kind of like whitespace. This is really useful for changing part of an identifier in languages like Python and Rust with normal ...
1
vote
0
answers
37
views
What is the shortkey for adding a space before a word in normal mode?
I have the following text:
#Text
My cursor is on character T; I want to obtain
# Text
i.e., to put a space between # and T, without "pressing i and then space". Instead, I want to do so in ...
0
votes
1
answer
436
views
How to copy N words under cursor and to right of cursor?
How can I copy continue close current into buffer without getting into visual mode?
That is, how to copy N words from cursor?
0
votes
2
answers
144
views
Visual mode word behaves differently than in normal mode?
Say I have the text:
This is a test!
If my cursor is on the first character, "T", and then I do d4w, then I am left with just !. However, if instead I do v4wd then I'm left with nothing (i.e. the ...
6
votes
4
answers
1k
views
How to get all distinct words within a set of lines?
I would like to extract a list of distinct words from a set of lines. Is there a way of doing this ?
Say for example I have lines that look like this:
[
[(isPhysicallySettledFxFwd, NO,"Y"),(...
4
votes
3
answers
3k
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
1
answer
142
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
1
answer
717
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 ...
2
votes
1
answer
1k
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 ...
2
votes
2
answers
351
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
...
6
votes
2
answers
314
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 ...
25
votes
3
answers
9k
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 ...