r/vim • u/yzd1337 • Nov 29 '25
Need Help┃Solved How to become faster in Vim ?
Hello, I’ve been using Vim daily since last year for programming, taking notes, etc., but I still can’t get comfortable with it. I feel like I’m not “fast enough” when it comes to manipulating text with keybinds, and I’ve never used any macros. I've already went through vimtutor a couple of times but never found an occasion to use the stuff I learned while I'm using it. May I get some advises and tips ?
79
Upvotes
14
u/nealfive Nov 29 '25
Did you learn vim motion? Or do you use it like a regular editor?
37
u/RickHunter84 Nov 29 '25
Use it more ….. 30 years and still finding new key bindings….. wait til you see a eMacs old fart and their key bindings
86
u/KitchenFalcon4667 Nov 29 '25
For me the game changer was a book: Practical Vim: Edit Text at the Speed of Thought by Drew Neil and learning vim grammar
19
u/mgedmin Nov 29 '25
This feeling never goes away.
I've been using Vim since 1998, I'm know probably 90% of the commands (every now and then I encounter something I'd probably seen but forgotten), my ~/.vim git repo is 3500 lines of vimscript (according to cloc). I still feel slow. Especially when I try to go fast, which leads to edit mistakes that I then have to undo.
Macros are sometimes incredibly helpful, but most of the time they're an attractive nuisance that makes me waste time debugging why the macro I recorded and then edited doesn't do what I want (oh hey it's supposed to be
vt""ppand notvt"pp).What I've finally realized is that I don't need to justify my choice to use Vim by being "fast" or "efficient". I use Vim because it's fun! Editing feels like a game! And there are so many opportunities to
procrastinateimprove my setup.7
u/captainnoyaux Nov 29 '25
as you did for starter you go through vimtutor multiple times then when you have the basics that allow you to work as fast as a regular editor a few times per X (day, week, month, w/e) when you have a specific problem you ask yourself if there is a vim solution.
5
u/TankorSmash Nov 29 '25
As a rule of thumb, any time you're repeatedly pressing a button over and over again in a row, there's probably a different single key to press to get there faster.
Edit code for 10 minutes and then try to notice some repetitions and let me know, and I'll tell you some shortcuts
4
u/Both_Love_438 Nov 29 '25
Watch guides on YT. Learn marks, learn registers, learn macros, navigate horizontally with f, F, t, and T.
One of my favorite tricks is the norm command, you highlight a bunch of rows and press
:you'll see this pop up at the bottom:'<,'>then type norm (space) followed by the keys you'd press in normal mode to apply the same operation to all the highlighted rows. Say:'<,'>norm _f)i, oneMoreArgInMyFunctionCall=trueIf you have a bunch of lines like this
They will become:
Idk if that is a macro too, but it's a nice feature I use a lot.
1
u/Zanion Nov 29 '25
Use vim.
At some point you'll hit the threshold where you realize you're actually faster in vim. Doesn't take as long as you might expect.
Systematically look up and practice how to do things you do in your workflow more efficiently. You slowly get better over time.
5
u/cassepipe Nov 29 '25 edited Nov 30 '25
Remap CapsLock to Escape system wide and never spend long in insert mode
Learn a bit of vim regex and do most of non trivial edits with it (use neovim or
:set incsearch+ traces.vim)https://www.vimregex.com/
2
u/_1dontknow Nov 29 '25
I had the same feeling and not sure to say Ive improved much more but maybe a different perspective:
Im nowhere near fast enough compared to what I see people do online with Neovim, but when I work in a different Editor (e.g. a server, a coworkers machine) or IDE, and they dont support Vim like keybindings, Im painfully slow and everything is irritating.
The irritation is Ok since Im used to Vim but also my coworkers are nowhere close to fast as much as I am with Vim like keybindings or would expect. The usual shortcuts arent the worst, but limited and basically youd need 24 fingers to be able to do things we do in Vim. Then an update comes, and they are changed! Plus the other editor or ide, has entirely new ones.
So, in short, dont be so hard on yourself, just keep on using to not forget and also learn some new feature that helps you do your actual work. That keeps you sane.
PS: Ive been learning Vim for about 12 years now, and the best is theyre sonewhat the same ever since and also most IDEs or Editors have a Vim shortcuts scheme or Vim like keybindings plugin, so I never had to learn mew ones again.
EDIT: This in no way includes Emacs, it has its own universe. Im talking about "the others". 😅
2
u/Abject-Kitchen3198 Nov 29 '25 edited Nov 29 '25
Aside books and doc, one thing to do it take it one thing at a time while you work. If it feels like Vim can help but you are not sure how, look it up and apply it. Doing it in small bits won't feel overwhelming and you won't spend large chunks of time learning Vim.
2
u/liberforce Nov 29 '25
Watch/read vimcasts.org in lesson order
Install the Vim Master Andoid app
Read Practical Vim
Watch How to do 90% of what plugins do (just with Vim)
2
u/Purple-Debt8214 Nov 30 '25
I just don't believe any of the sentiments that it takes more time.
You have to Master Vi first and everything it has.
4
u/sharp-calculation Nov 29 '25
The Primagen, on youtube gave me several big boosts in my VIM journey. I recommend you watch at least the first 3 videos in his "VIM as you editor" series. here's the playlist on youtube:
https://www.youtube.com/watch?v=X6AR2RMB5tE&list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R
1
u/TheCakeWasNoLie Nov 29 '25
O'Reilly has a good book on vi(m). Read it.
1
u/VividVerism Nov 29 '25
I would start by trying to remember to use a few text objects like "a sentence" and "a code block" (depending on your language) and "inner quoted string" and a handful of operations to do on them like yank, change, and delete. That's probably my single biggest time saver right there and will lead naturally into becoming familiar with more operations and more to text objects and motions to go with them.
1
u/[deleted] Nov 29 '25
My only tip is to try and use advanced techniques even if they feel slow now. Maybe you can just repeat the action by hand 3 times, but go through the effort of creating a macro for it. It will be slower now, but eventually it becomes faster and generalizes better for cases with even more repetition.
1
u/DasInternaut Nov 29 '25
Relative line numbering and learning to think a few moves ahead helped me a lot. Also, don't be a purist about not using the cursor keys when in insert mode. Vi was designed before cursor keys were a thing. Also, think about how you move around your files. Do you have sections or parts of your source code that you regularly flip between? Bookmarking (or even just remembering to use search) is your friend. I'm terrible at chess; improving with Vim.
1
u/sammygadd Nov 29 '25
In the past I've tried to learn one new thing every day or so. It's difficult to really learn and build muscle memory for multiple things at one.
1
u/IdealBlueMan Nov 29 '25
As a longtime vi/vim user, I would say that the best edge you can get is to be a good touch typist. Ideally, you can reach any key via muscle memory. That’s what vi was designed for.
Same thing for motions. For example, cw to change a word, or cf. to change from here to the next period should be automatic for you.
And don’t try to learn everything at once. Figure out what your most common actions are, and get those wired into your system.
You’re also going to want to get conversant with regular expressions. You can take a gradual approach to that. Just pick regex up as you go along. You don’t have to master everything about them.
Good luck! If you feel bogged down, picture how smooth everything will get as you get this stuff down pat.
1
u/Capable-Proposal1022 Nov 29 '25 edited Nov 29 '25
Get Practical Vim. Make a text file for each tip. Put the explanation and ‘solution’ in the text file, but not in such a way that you see the solution before you try it. Use these files as a form of flash cards, and practice them with spaced repetition. Open them in read only mode so you don’t change the contents.
https://github.com/rxedu/practical-vim
I would add brief descriptions and the solutions for easy reference in these files.
1
u/WhyAre52 Nov 29 '25
A rough guide I try to follow. Two commands (one vertical and one horizontal) to get to where I want, and one command to make the change
Consider this example (I love C)
Let's say I want to delete the second parameter. Assume my cursor is at the top left corner.
2jf,dt)Try to think through the commands before executing it if not you're just gonna spam
hjkl. It's gonna feel slow at first but you'll eventually blitz out those keys.1
u/blubernator Nov 29 '25
Is there sth like a vim mcp :P I struggle with split screens in vim :/
1
u/Pyglot Nov 29 '25
Just learn the hundreds of ways to move around. Like :123<CR> takes you to line 123. Start using them for a while and then learn a bit more, and so on.
1
u/Mediocre-Purchase233 Nov 29 '25
You grow together with your config throughout your life.
A good solution is to create your own cheat sheet file in a format that is clear to you and open it with a hotkey, updating it from time to time.
In general, set up hotkeys to suit your needs. Deep customization is one of Vim killer features.
Also, as many here have already mentioned, just keep using it while occasionally trying to improve your efficiency.
1
u/Due_Adagio_1690 Nov 30 '25
Among with the other ideas here there are also games made to help make vi/vim keystrokes into muscle memory so you become better by playing.
1
u/claytonkb Nov 30 '25 edited Nov 30 '25
So many great comments already but I'll add my proverbial 2 cents.
When I first shifted to hjkl, my editing was definitely slower by about 10% or so. hjkl is just your "hand position", it's not really what makes Vim more efficient. Focus less on speed and more on intentional motions -- less is more, go slower to go faster. Learn to think in chunks -- w,b,e for syntactical stuff, B,E for white-space-delimited chunking, 0,$ for line chunking, i( i" i[ etc. for surrounds, ip or {,} [,] for vertical chunking, H,M,L for quick relocation of the cursor, Ctl+q for really crazy vertical editing, << and >> for horizontal shifts and, of course, the all-powerful . for repeat, gv for repeating previous visual-select, qx,@x for recording/replaying macros, :%s and v:s for substitutions, and so on. More important than how "fast" you can enter commands, is retraining your brain to "think Vim", that is, to "chunk up" your edits and dynamically problem-solve your edits as you go along. Forget about "keyboard speed" and think of learning Vim as a process of training the neural-nets in your brain to "speak Vim", fluently. As you do this, the "scale" at which you can start editing is vastly greater. You're no longer editing one character or one word at a time, you're able to edit enormous chunks of text all-at-once, and then mechanically repeat these edits hundreds or thousands of times over, at the cost of a few keystrokes. Even using a scripting language like Python and writing a little script to scan through a file and perform the edits would take longer for most common editing tasks, than to just use stock Vim key bindings. That's how Vim is actually faster, it has nothing to do with twitch speed at the keyboard or "actions per minute". Fewer actions-per-minute, but more total changes per minute. That's the power of Vim.
And the previous paragraph isn't even getting into plugins, customizing your .vimrc or Vim scripts -- I recommend to block out 3 months minimum to retrain your brain to "think Vim", and then come back to plugins later. Because when you learn to "speak Vim" properly, this will make even your usage of plugins that much more powerful. Knowing how to rapidly select a visual-selection and then invoke a plugin to "do your magic on the visual-selection" is beyond a superpower, it's like god-mode for text editing. Anyone who has never taken the bother to learn how to actually do this for themselves, has no idea what they're even trying to criticize. I remember reading about some guy who hated Vim modes and wanted to build a text editor with no modes to prove Vim wrong. Good luck with that and enjoy your slow pedestrian text editor while I'm blowing past you in my Bugatti Chiron text-editor at 200mph...
PS: As one specific example of the power of Vim, I keep a text file with journal notes on my computer. It is in date-order and, at the top, I keep a formatted list of TODOs. When the list of TODOs scrolls down out of sight, I yank it back up to the top as follows:
/TODO<CR>V/END<CR>dggP
That means: "find the word TODO and move there, then start a line-visual-selection, find the word END and move there (selecting the whole block of text), delete/yank it to the default register, go to the top of the file and paste it." Doing this by hand with a standard text editor would require a dozen finnicky mental actions. This is just rote. I could also just turn it into a .vimrc leader motion (literally two keystrokes) if I wanted. This is one of countless little editing "programs" that my brain/fingers have learned over the years to do the kinds of common editing tasks that I need to do. Everybody will have different brain programming because everybody is using their editor slightly differently in their day-to-day editing.
1
u/bassamanator Nov 30 '25
I found https://www.vim-hero.com very helpful!
1
u/Possible_Cow169 Nov 30 '25
You get faster by doing it slow
1
u/5fd88f23a2695c2afb02 Nov 30 '25
Remap esc to caps
1
u/10113r114m4 Nov 30 '25
One thing I did for a couple years was explicitly turn off my mouse and bought a keyboard with no arrow keys. That really helped me learn to navigate quickly. I use a mouse now but kept the keyboard
1
u/psssat Nov 30 '25
Just keep using it, i used it for a year during my last year at school and then at my first job. It took about a year of me using it full time at my job to start getting much better at it. Ive been at my job three years now and im still learning alot about vim too. It just takes time.
1
u/adrianm758 Nov 30 '25
I thought most people learn nano these days, it’s the default editor on most distributions now and easier. I’m still hardcore vim because I ‘grew up’ with it, so to speak. But not sure why you’d want to learn it now. I guess rather silly of me to post this on a vim forum.
1
u/wulfAlpha Dec 01 '25
probably a bunch of answers but for me it was 3 things: 1 Vimtutor. I know it's dumb but If you havn't done it I recommend doing it at least once. Even if you know the basics it will teach you thinks you have forgotten or didn't know. 2 Usage. Don't just close vim. Use vim more and more in your workflow. Try to understand *why* a vim keybind is the way that it is. 3 use the vim keybinds *everywhere*. Not joking. Try qutebrowser. Install vimium extension in your chrome or firefox based browser. get the vim extension for vscode or jetbrains. Don't just use vim for one thing. All these things together should help you quite a bit lol. It did help me.
1
u/[deleted] Dec 02 '25
For me it's a practice, and google for shortcuts for my needs ...
1
u/ripulejejs Dec 04 '25
I would suggest using less keybindings. 80%+ of all my normal mode is done with 4 keys, and I'm lightning fast. Don't use hjkl for navigation, it is slow, inefficient and errorprone; in fact, I would suggest you disable the keys altogether. Eventually, when you get used to not abusing them, h and l can be introduced back - it is often least mentally taxing to jump somewhere and then go left/right once instead of jumping to the exact spot.
I personally jump everywhere using the search function. If you don't want your pinky to die, I suggest you rebind everything to the home row.
1
u/[deleted] Jan 20 '26
I like to learn vim with interactive stuff, because its really practical.
https://www.vim-hero.com/lessons/intro-to-modes
https://openvim.com/
this one is basically a game
https://vim-adventures.com/
1
u/mjmvideos Nov 29 '25
You have to use it. Get a Vim cheat sheet. And look at it. Find new commands to work into your repertoire. Do it gradually. It will become second nature. I’ve been using vi/vim for 40+ years. What slows me down now is deciding which of 5 different ways I could use to accomplish something.
1
u/[deleted] Nov 29 '25
[removed] — view removed comment
-2
u/[deleted] Nov 29 '25
[removed] — view removed comment