Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [cursor-movement]

Moving the cursor another place in the buffer.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
48 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? ...
user5074736's user avatar
1 vote
0 answers
20 views

Custom Jumplist Behavior

I enjoy using ctrl-i and ctrl-o to quickly jump back large distances in a file. I would enjoy if this functionality could be extended to the in-line motions such as f, F, w, b, ... I understand that ...
cuppajoeman's user avatar
1 vote
0 answers
33 views

How to prevent cursor shift when using `<cmd>` (like `<c-\><c-o>`)?

I currently have inoremap <M-j> <C-\><C-o>gj in my config but I would like to avoid triggering all InsertLeave autocommand when doing this. inoremap <M-j> <cmd>normal! gj&...
0x539's user avatar
  • 197
1 vote
0 answers
57 views

gvim can be really slow to display the last typed character in VirtualBox. How do I fix that issue?

While working in an Ubuntu VirtualBox (host is also Ubuntu), gvim is being really slow at showing the last character I just typed, or, when I move the cursor up/down/left/right, it also takes 1 to 2 ...
Alexis Wilke's user avatar
1 vote
0 answers
250 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 ...
Augusto's user avatar
  • 119
1 vote
0 answers
233 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 ...
qeatzy's user avatar
  • 958
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 ...
minseong's user avatar
  • 2,333
1 vote
0 answers
53 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 ...
lindhe's user avatar
  • 477
1 vote
1 answer
323 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> &...
minseong's user avatar
  • 2,333
1 vote
0 answers
420 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 ...
Michael Ma's user avatar
1 vote
0 answers
81 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 ...
Wildcard's user avatar
  • 4,429
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 ...
albttx's user avatar
  • 1,195
0 votes
1 answer
43 views

Vim: move in the INSERT mode between lines using left/right arrow keys

In Vim while in the INSERT mode, I would like to be able to move between lines using the left and right arrow keys. For example, if the cursor is at the beginning of a line and I press the left arrow ...
nvx's user avatar
  • 9
0 votes
0 answers
39 views

NERDTree window change during tab switch

Currently, when using NERDTree, I hit Ctrl-ww to navigate to my NERDTree window from my editing window. Then, I navigate to a file I want to open, and hit t to open it in a new tab. Now, when I want ...
cz1's user avatar
  • 1
0 votes
0 answers
35 views

Popup to show number of matches of a given string while in insert mode, and while completion popup is being shown

This is a follow up to a previous question. Thanks to that, I could come up with this augroup: augroup Foo autocmd! autocmd TextChangedI,TextChangedP * call <SID>foo() fun s:foo() let ...
Enlico's user avatar
  • 2,214
0 votes
0 answers
46 views

How can I get the number of matches of pattern without altering the search buffer nor moving the cursor?

My end goal is to be able to highlight all the matches of the word being typed and echo their number, but this question is about one specific aspect of this, which I've been having trouble with, ...
Enlico's user avatar
  • 2,214
0 votes
0 answers
50 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 --...
minseong's user avatar
  • 2,333
0 votes
3 answers
305 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. ...
Julius Hamilton's user avatar
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 ...
Benoît Faucon's user avatar