Questions tagged [cursor-movement]

Moving the cursor another place in the buffer.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
39 views

Best way to move cursor to start of variable declaration?

There are a lot of times were I have something like int x = someFunction(a, b, c); If my cursor is somewhere after the equals sign, is there a good way to put the cursor on the “s” in someFunction? ...
2
votes
0answers
380 views

Relative line number colouring

I have relative numbering turned on. There's no immediate way of telling which direction I want to move, however. For example, sometimes I see line number "7" and move 7j (7 lines down) when I really ...
1
vote
1answer
35 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
72 views

Can I use feedkeys() inside of a keyloop implemented by getchar()

I implemented a fuzzy filter, which accept a list argument, open a window with a scratch buffer whose content set to the list, then waiting for use input and do filtering. Here is why I ask this ...
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 ...
1
vote
0answers
191 views

Jump from tag-to-tag in xml?

I'm using emmet-vim which says that it can work in xml files but I can't seem to navigate between tags. Say I have this structure: <dependency> <groupId>com.google</groupId> &...
1
vote
0answers
176 views

In Vim what is the reason that ce and cw are the special case to be the same if the cursor is on a non-blank?

Why not just let the meaning of w in cw the same as in dw? I means the w in dw for me is at the next word's start. Does it make something more convenient or just more complicated? If the latter, I ...
0
votes
1answer
55 views

How to bind these keys to prevent recursive binding in Vim?

I have been trying to do :noremap j k and :noremap k j which works but instead of going up it goes slanted up and down. I want j to move up and k to move down which is opposite in vim. I also tried :...
0
votes
0answers
41 views

Prevent viewport from jumping to the right

As soon as I put the cursor on column 79 or beyond, the Vim viewport jumps to make sure the cursor is put in the middle of the viewport. I find it massively disturbing, but could not navigate my way ...
0
votes
0answers
166 views

How to make vim automatically do a CTRL+D after jumping to a tag?

When I use CTRL+] to jump to a tag, the cursor will be placed at the center of the window. How can I make it stop at the top of the window? Now I do this by pressing CTRL+D after each jump. I was ...
0
votes
0answers
67 views

Column-based w command?

From a given cursor position, how can I move vertically to the next non-whitespace character (in the same column), whether up or down? Since I highly doubt this is a built-in motion command (if it is ...
0
votes
0answers
1k views

Vim bind ctrl arrow key not working on osx

I know they have many topics about that, but i no one of them works. My configuration worked before to switch between split window, but my session has been re-init and i lost my osx config and it's ...
-1
votes
1answer
37 views

how to move to the end of a string / beginning of string for a macro

i want to write a makro and need to know how i can move to the end and to the beginning of a string, respektively i want to visually select the link so that i can surround it with brackets. my line ...