I'm currently working on practicing and learning to use Vim as an editor. After a few sorry attempts to learn it quickly by sitting down and doing...
For further actions, you may consider blocking this person and/or reporting abuse
This is also the setup I used. No arrow keys. After 6 years without it I used hjkl for my configs (zsh, xmonad, web browers, weechat etc...).
If you want to reduce finger travel here is another tip :
Remap jj to is the second best thing i did in my vim life.
Can you tell me how you are using
hjkl
in terminal and on other applications?I found this post that has some good resources. Also, they link to their fork of oh-my-zsh that makes allowances for vi-mode while still letting you do history searching and stuff. Looks pretty legit, I'll have to check it out when I get home.
Thanks for that! I'll check that out.
I used personal keybinds, inspired by vim in my xmonad config and weechat config. For web browsers i recommend Vimium (For Firefox and Chrome/Chromium). For zsh there is a vim plugin available. A lot terminal apps works well out of the box with hjkl, so I always give it a try.
I map CAPSLOCK to ESC. Not in Vim, but in the OS.
CAPSLOCK is a worthless key in a prime real estate location.
I do not remap CAPSLOCK only because I like to have this module active in polybar
Well here is more tips on learning Vim, I hope it helps anyone:
First of all hit you terminal and type
:vimtutor
...this is the first step! Take 30mins to 1 hr to practice relaxed, no rush! 👨💻There's a nice book called Mastering Vim Quickly by Jovica Ilic, that is a pretty good one, and If you can't invest right now, you can subscribe to get chapters for free and newsletter tips.
vimcasts.org is a free good resource with videos and articles.
I started to write quick tips and tutorials for Vim beginners too, to help them deal with specific configs and get excited with tricks you can use.
You can check it on medium.com/vim-drops!
Duckduckgo.com has a cheatsheet embedded on the search bar... you can type vim cheatsheet and you get:
Cheers!✌️👨💻⌨️👩💻✌️
This is a nice tip! What stopped me from doing this in the past is that I still rely on arrow keys when I'm in command-line mode (when you press
:
or/
). My personal tip is to learn about leader keys and really make use of it 😃.Cool! What are some of your most frequently used leader commands?
My most used are saving, quiting, and save&quit in below. Reducing keystrokes are always a plus!
Awesome. I'll definitely have to do more leader-ing. Thanks!
Neat! Here's the snippet I've just made for Spacemacs (which is mostly like Vim, but, erm, is in fact Emacs) to do the same thing: gist.github.com/lockie/6d74aa5ca2c...
I'm thrilled to start using it though, even writing this snippet in Spacemacs with half of rules activated made my brain tingle :D
I think this method is the best for stop using the arrow keys 😅
Seriously, taked me a while to stop using them, I did it in this way:
I've been using Vim for about 20 years. Before that I used Emacs for 2 years.
After a particularly interesting "my editor is better than your editor" flamewar with a coworker, we made a deal: I'd use Vim for 6 months, and he'd use Emacs for 6 months.
At the end of the 6 months, he switched back to Vim, and I never went back to Emacs. (I'm not saying Vim is better than Emacs. I'm saying that Vim is better for me.)
So for anyone thinking of using Vim my response is simply, "It's too late for me! Save yourself!" That's a "ha-ha only serious... well, only slightly serious."
Vim let's me become one with the keyboard. The editor gets out of the way. My fingers know it tacitly. I never have to reach for the mouse.
Bill Joy, the creator of vi, said that vi was made in the day of 300 baud modems and every character of very limited bandwidth was precious. These days, we have gigabit internet connections. The reason that vi is the way it is is no longer is a factor.
Yet I still use Vim, every day. I also use Visual Studio and Xcode... but when I want to do serious coding* I hop over to Vim.
* which is in C++... another "It's too late for me! Save yourself!"
Visual Studio Code vim plugin is awesome ! Even if I like VSCode, I can't get away from my neovim config and all the plugins I have.
The biggest eye-opener for me was embracing the difference between Tabs and Buffers.
joshldavis.com/2014/04/05/vim-tab-...
Coming from UI-Based editors like Sublime, learning the difference was an important step in understanding Vim (and also Emacs, similar principles).
Also, a more general tip for people considering Vim: Learn it anyways. The skillset you build by learning modular editing can be applied in any major editor/IDE via plugins.
Cool, thanks for the tips! I’ll give that post a look.
Talking about movements recently I discovered g_ to jump to the last non-blank char in the line and _ to jump to the first non-blank.
I also became amazed, long time ago with gf gi and gv
Obligatory @maestromac mention