Skip to main content

Questions tagged [vi-words]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
44 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.
Oneechan69's user avatar
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 ...
Dominik Teiml's user avatar
1 vote
0 answers
35 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 ...
Naghi's user avatar
  • 111
0 votes
1 answer
399 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?
zundarz's user avatar
  • 305
0 votes
2 answers
133 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 ...
rb612's user avatar
  • 101
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"),(...
user3203476's user avatar
3 votes
3 answers
2k 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 ...
ifearthenight's user avatar
1 vote
1 answer
130 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 ...
user avatar
0 votes
1 answer
689 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 ...
ivan's user avatar
  • 1,470
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 ...
gandalf3's user avatar
  • 267
2 votes
2 answers
345 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 ...
dominikduda's user avatar
6 votes
2 answers
296 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 ...
the_velour_fog's user avatar
25 votes
2 answers
8k 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 ...
Wildcard's user avatar
  • 4,429