Questions tagged [cursor-movement]
Moving the cursor another place in the buffer.
312 questions
0 votes
2 answers
81 views
Move cursor to start of selection while keeping selection
Consider following text. Let us jump to the line below clone (/clone<enter>j). From there let's select a rectangle up to <ctrl>v/d the most<enter>. Now lets say that I reconsidered ...
-1 votes
0 answers
18 views
More intuitive handling of long lines [duplicate]
Imagine that I have a text with longer lines as the screen. So: 1 Quantum field theory is a set of ideas and tools <-- end of screen 2 that combines three of the major themes of modern <-- ...
1 vote
2 answers
83 views
`t`ill or `f`ind downwards in visual block mode
I make a lot of use of till and forward when I'm moving around. When I'm creating ASCII diagrams I find myself wanting a similar version for up and down. Using this usenet logical map featured on ...
1 vote
2 answers
123 views
How to place cursor at the first line of the output after executing a command in a terminal buffer
Suppose we did exec 'vert term bash -c "cmd"' where cmd is a command whose output consists of multiple lines. By default vim will place the cursor at the last line of the output. How to make ...
1 vote
1 answer
114 views
Is the target of , and ; really empty when opening a Vim session? And can it be reset after it's been filled by one of f/F/t/T?
I'm asking this question because I'm investigating Implement a decent vi editing mode #60. So I'm trying to fully understand how ; and , are supposed to work in Vim. I have the impression that when I ...
1 vote
1 answer
360 views
Is there a way to move the cursor specifically to the beginning of the visually selected region (not just toggle like `o`)?
When in a visual selection you can press o to have the cursor jump between the start and end of the selection without affecting what is actually selected. Is there a way to do a similar thing, but in ...
1 vote
1 answer
188 views
How to jump to next modified (not added or removed) line in a diff?
:help jumpto-diffs gives commands to jump between changes in a vimdiff: Two commands can be used to jump to diffs: *[c* [c Jump backwards to the previous start ...
0 votes
1 answer
112 views
Cursor can’t move beyond closing bracket (only .sh files)
I’m in the process of learning vim, so I’m sorry if I’m asking an obvious question. The problem: if, inside a script, I use a bash "case" statement, if I’m in insert mode, my cursor can’t ...
2 votes
3 answers
165 views
i_<CTRL-Right> to advance WORDs (not words)
In insert mode, I want to move between WORDs (like normal mode's big W), so that I can save keystrokes. Specifically, inoremap ., to go left and inoremap ,. to go right. This way I can avoid changing ...
1 vote
1 answer
314 views
How to do gj or gk multiple times more efficiently?
If I want to move up and down the display lines in normal mode, I have to press gj and gk repeatedly. Is there a way so I could just press j and k repeatedly and temporarily to do so?
2 votes
1 answer
342 views
Is there an alternate default cursor up movement key in Vim normal mode?
In the normal mode of Vim (default keymaps), other than hjkl or the arrow keys, spacebar moves the cursor right, backspace moves the cursor left, enter moves the cursor down. Is there another key (not ...
1 vote
1 answer
75 views
Have the cursor in the beginning of the replacement string post find-substitute
The commnad: :s/foo/&bar when applied to a line containing foo, catches it and append bar on it, then user hits Enter, the cursor immediately gets into very beginning of the line. How to let it ...
2 votes
1 answer
364 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 ...
1 vote
0 answers
48 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 ...
1 vote
4 answers
82 views
Rotate list of lines
Assume you have the following block of text (yes: I am using vim-latex, but this is not relevant): \begin{itemize} \item 1 % [[[ \item 2 \item 3 \item 4 \item 5 % ]]] \item 6 \end{itemize} My ...