Questions tagged [cursor-motions]

Commands that moves the cursor. A motion command is used after an operator command to move over the text that is to be operated upon.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
51 views

How can I specify the movement direction for text objects?

How can I specify a direction (for going backwards) for commands working on text objects like 2caw? E.g. I like to make 2caw replace bbb ccc in aaa bbb ccc ddd while on c.
3
votes
0answers
160 views

how to delete a paragraph respecting the folds?

I have a file (filetype=javascript), this is how it looks without folds: and with folds: I can move with the { and } motions skipping the empty lines inside the folds (thanks to these question and ...
3
votes
0answers
477 views

Using text objects with IJKL navigation keys

Like many people, I prefer a triangular or inverse-T navigation key format like IJKL instead of HJKL for ergonomic reasons. There's a pretty simple way to set this up in vim that I've used for years: ...
1
vote
0answers
35 views

How to do a motion without leaving history (in .)?

Often, you do a complicated motion, which you want to repeat soon by pressing . but carry out a simpler motion overwrites that one. Can I keep that complicated motion in . itself ? Concrete example: ...
1
vote
2answers
73 views

Text object for a field between tabs

I'd like to define a text object for tab-delimited fields in a tsv file. So far, I have vnoremap af :<C-U>silent! normal! T<Tab>vf<Tab><CR> omap af :normal Vat<CR> ...
1
vote
0answers
22 views

Different Deletion from seemingly equivalent motions

I have been learning vim for some time now and I am loving it but there is something that confuses me a little bit. For discussion proposes lets say that we have the following text foo.bar with the ...
1
vote
0answers
33 views

A quick way to restore motion after changing iskeyword

I want iskeyword to only affect completion. I need that in the case of Latex. I want \chi_{23} to be a single object with regard to complition. But changing iskeyword also makes \dosomething{crap} a ...
1
vote
0answers
27 views

]m moves to class definitions not method definitions inside nested classes

I am editing a java file. ]m takes me from one class to the next, instead of to the next method definition. How do I get it to take me between methods? Example: public class Baz { public class ...
0
votes
0answers
40 views

Cursor disappearing

I'm using pywal and the wal colourscheme and since enabling it my cursor seems to have disappeared, meaning it has the same colour as my background (that's what I guess) and I only see it blinking ...
0
votes
0answers
38 views

Select characters in Visual mode (works differently than Normal mode)

I'm trying to understand the difference in character counting between Normal and Visual modes. Roses are red, Violets are blue, Sugar is sweet, And so are you. The task is to copy everything from ...