Questions tagged [cursor-movement]

Moving the cursor another place in the buffer.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
41 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? ...
1
vote
1answer
22 views

Restoring cursor to position before delete after Undo

This question is asked multiple places but none have an answer that works for me. I've tried: '' `` g; g, ; , Ctrl+o In a file add: 123456789 Move your cursor over 7 in normal mode, type d4h, press u....
1
vote
1answer
58 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
132 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
212 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> &...
0
votes
1answer
43 views

How to go to the nth-to-last character in insert mode?

Capital A in Vim takes me to the last character in insert mode, but can I go to the nth-to-last character in insert mode (or append mode) in vim? Example: this is some t|ext how to go specifically to ...
0
votes
0answers
25 views

Jump to last change that was farther than X lines away

I'm looking for a command similar to g;, but that ignores changes that are close to the cursor (say, less than 5 lines away). When I'm editing some function in the middle of a file, I sometimes need ...
0
votes
0answers
40 views

What is the fastest way to move cursor to the end of a line by line number?

I recently found out that you can move the cursor the beginning of a line quickly by line number like this: :11 Regardless of your cursor position, this will move the cursor the beginning of line 11. ...
0
votes
0answers
56 views

Why C-0(zero) in insert mode is not working?

I have mapped some shortcuts to help me in insert mode and one of them is not working. " Go to end of line on insert mode inoremap <C-e> <C-o>$ " Go to beggining of line on ...
0
votes
1answer
118 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
44 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
195 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
48 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 ...