Learn VIM and don’t die in the attempt III special moves

Jhonnata Gil Chaves
4 min readOct 31, 2022

--

You can find this files in this repo

Continue with this sessions related to move more fast into VIM we move so fast to the next level for another ways to move inside for VIM.

Added numbers for current moves

Also when we added number like a prefix for our commands or moves in VIM these take that action and added for us more flexibility for using these, in this session we explore how to we can added number for our moves and make more easy our exploration for VIM

Take our previous post related to moves, we use in that session this special chars

w for move to the next word in the first chart
e for move to the current word or next word in the latest chart
b for move to the previous word in the first chart

With this little remind we move so fast for the next speedups using the same moves for our file.

Jump between words

First take a look for this command 3w , you can guessing about this command to multiply the current impact for w , so it’s time to start with our files (Please if you want take a look a files for this example access to this repository), first open the file

vim 3_file.txt

Now the cursor is in the first position over our file

vim 3_file.txt

In this position press 3w for using this special move

3w command

Now we seems how to the cursor moves from start position to a 3rd word after that

Now we continue explore a 2b command, in the same part that we move with 3wexecute the 2b command, now you experiment something like this

after 2b command

Also we move can use use an e command for this multiplier, for this case we added a 4e command, with something similar to this

after 4e command

Jump between charts

Whit that you can see the potential for these multipliers, but we introduce a new multiplier, that’s very special for you, because in a difference with others this new special move, help to us to move for every chart in our file, this is l this special move enable for us the ability to move in the same line inner characters, let’s try with 10l we seems something like this

after 10l command

This behavior is pretty awesome, if you need to move fast inside your file, also if you need to pick a special part of this file, but thinking that you need to move to a specific line inside the file and special part of this line, for example you need to move to the 2nd line at the 15 position in that file, we can use the next execution, first execute :2 for move to the 2nd line, next to 15lthat move your cursor to this position

after to move to 2nd line at 15chart

Modify with multiplier

Now it’s time to start to use the i aggregator for our files, but with a special moves also, think you need to write is in a couple of times, so you have the opportunity to use this 3iis<Esc> in the current position that you take in the previous special move

after wrote is 3 times

Exit

For finish this little session for special moves and write your results, you can use a :wq for write and quit, but if for something out of you your char was a :qw you can lost your time!! But take it easy, because you can take a new time for execute this task again.

Previous section

Next section

--

--

Jhonnata Gil Chaves

I’m a System Engineer and Software Developer. I love Linux and your philosophy it’s very nice share all knowledge that every day I learn around tech and make so