Questions tagged [cursor-movement]
Moving the cursor another place in the buffer.
13
questions with no upvoted or accepted answers
3
votes
1
answer
399
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....
2
votes
0
answers
46
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
0
answers
169
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 ...
1
vote
0
answers
218
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
0
answers
28
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
0
answers
48
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 ...
1
vote
1
answer
296
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
0
answers
317
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 ...
1
vote
0
answers
80
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 ...
1
vote
0
answers
2k
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 ...
0
votes
0
answers
43
views
Go to end of last pasted region
Sometimes `] works, but not after inserting some new text somewhere.
How can I jump to the end (and/or start) of the last region of text I pasted with some variant of p?
`] does not work here:
vim --...
0
votes
3
answers
169
views
Is there a built-in method to jump to the next character after a tab character?
I am editing tab-delimited data in a plaintext file (that was originally a spreadsheet) and I'd like to quickly jump forward to the next entry, the character after the next "tab" character.
...
0
votes
0
answers
27
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 ...