Questions tagged [movement]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

movement similar to "f" but you can specify more than one character as search criteria

Say we got this sentence: pafpaf apfa fpa i apa panda pafas af I would like to quickly move the cursor from the start of the line to the beginning of the word panda. I could do 6fp, but what takes ...
1
vote
1answer
78 views

Delete everything between two surrounding characters

Commands I use a lot are commands like: dib (delete everything between two surrounding parantheses) di{ (delete everything between two surrounding curly brackets) ... it works for a few other ...
1
vote
1answer
96 views

How does the underscore forward movement work? _f

I was recently watching a more advanced vim tutorial on youtube. One of the commands used was _f. This was actually just part of a longer macro being demonstrated and the underscore wasn't commented ...
1
vote
2answers
186 views

How to move selected lines up and down? [duplicate]

Is it possible to move selected lines up and down? c = 3 a = 1 b = 2 I would like to select second and third lines and move them one line up, so that result be: a = 1 b = 2 c = 3 I know that > ...
3
votes
1answer
61 views

Why > sometimes move 4 whitespaces sometimes 3 whitespaces in my vim?

Here is part of my vim setting: set tabstop=4 set sts=4 set expandtab set softtabstop=4 set shiftwidth=4 When I edit a file in /mtp/test, type print('ok') in the first line, and type 1> in ex mode,...
2
votes
2answers
92 views

Undo an 'f' movement (or in general, any movement that Ctrl-O doesn't undo)

I just accidentally did f], how do I return the cursor to where it previously was? Ctrl-O doesn't work of course because f is not regarded as a jump. , doesn't work because I wasn't on a ] previously.
-1
votes
1answer
64 views

How to move a selection horizontally whilst retaining the selection?

I want to select some characters on a line, then be able to move them by one character forward/backward (i.e to the right/left) as many times as desired whilst retaining the selection as it moves. ...
0
votes
1answer
26 views

Override a plugin to restore movement key?

I'm using the pencil plugin which remaps the jk movement buttons to go up/down by row (text is soft wrapped) rather than line, which is usually helpful. But at times I want to have the normal behavior ...
0
votes
3answers
74 views

Does a plugin exist which allows moving (across) the windows and split them without having to press Ctrl+w before each action?

I'm kind of fine with moving across windows using Ctrl+w followed by (sometimes a counter and) h, j, k, l, p, t, b, and I'm also fine with the similar key combinations to split the windows or to move ...
0
votes
1answer
45 views

jump to files on puppet include function

On a particular init.pp file, I have the following definition: class temp_executor { if $::fqdn =~ /host.*01/ { include ::temp_executor::deploy } } deploy.pp is on the same folder as init.pp. ...
2
votes
1answer
390 views

Bottom Padding In Vim?

My (n)vim window looks like this: Line 91 is the end of the document, and it's flush with the document name at the bottom (essentially the bottom of the screen). How do I "move" that line ...
1
vote
1answer
19 views

Vimrc syntax move up and down a certain line continously

So I am new to Vim and I am trying to understand the language of vimrc. I have this in my vimrc: map <F8> <C-E>: sleep 100m<CR>j<F8> This would automatically move the cursor ...
10
votes
2answers
577 views

What is a "section" in vim?

I'm trying to improve my ability to move around inside files in vim, especially using built-in mappings/commands. I edit a lot of different types, including shell, markdown, Python, etc. I'm familiar ...
2
votes
1answer
52 views

Is it possible to prevent a mapping from being repeated with a prefix number (vim range)?

Sometimes it is possible to accidentally hit some numeric keys. I have a lot of binds and for most of them there is nothing to be gained by allowing them to repeat with a prefix. Let's suppose that ...
2
votes
2answers
52 views

How to (more reliably) recognize the end of sentences in LaTeX?

Movement and actions using ) and ( are very powerful: I use them all the time. However, when writing and editing LaTeX, I have run into the following problem: vim cannot recognize the end of some ...
2
votes
1answer
95 views

Why do arrow keys behave differently in insert mode than in other modes?

Background I would like to disable arrow keys in all modes. This is what I tried: "EDIT: added remap for <esc> as per the comments inoremap <esc> <nop> inoremap <up> <nop&...
2
votes
2answers
59 views

"[[" and "]]" jump to top and bottom of file instead of expected behavior

I'm trying to utilize section movement via [[, ]] and friends, but I'm not seeing the behavior I'm expecting given my understanding of the documentation. A section begins after a form-feed () in ...