Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…
Interactive Vim tutorial
211–220 of 230 posts
Re: Interactive Vim tutorial
#212Earlier quoted context omitted.
It's a fair point. I learned ESC long years before ^[ and it's stuck in my muscle memory. But a new user might benefit from using ^[ instead. Some keyboards put F1 where ESC belongs, and my habit has been to remap F1 to NOP because help is so annoying, but maybe I should remap ESC to help. That would get me to switch over in short order.
I've remapped capslock to ESC. I can't remember ever wanting to use capslock mode since I first learned to touch type. Much easier to have Esc there. Or Backspace, Home, End, or delete are also good options.
Of course, then I bought a kinesis advantage2 keyboard and now suddenly every key is easy to press, even the cursor keys.
Re: Interactive Vim tutorial
#213Earlier quoted context omitted.
Mapping jk and kj to escape and mapping caps lock to some other hyper key is way better than caps lock to esc IMO. You can just mash both j and k together and you are out of it. inoremap jk And inoremap kj In your vimrc file should do it.
I have considered such alternatives in the past and they did not work for me. For example, how can I conveniently type the string "jk" or "kj" with such a configuration? The artificial delay I have to introduce between typing "j" and "k" to actually type "jk" is unacceptable. Although it is rare, I sometimes do have to type "jk" in special circumstances such as while typing LaTeX code. Mapping Caps Lock to Escape is…
Re: Interactive Vim tutorial
#214Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…
Re: Interactive Vim tutorial
#215All these tutorials are like taking beginner French. If you want to learn French live in France. If you want to learn Vim you have to live in it. Use it for your development full time. Then over time you start to see it's power. For me on Windows, GVim was the only sane option. Mostly because the Windows console can't fully handle syntax highlighting / italics. However it's also a good transition world. You've got al…
Re: Interactive Vim tutorial
#216Earlier quoted context omitted.
You might be right. It's true that vim has a learning curve one way or another. On the other hand, if I want to show someone the "good parts" of vim, I try to show them something they can't do in another editor, rather than something that they can do (arrow keys). Even if I 100% agree that arrow keys are a worse experience, it's just not as convincing as something that can't be done outside of vim. At least in my exp…
Yeah, but that's a good way to sell vim. Once you've shown someone vim and whet their appetite, it's probably best to show them about 2 or 3 features and let them fill in the blanks while being at least minimally productive. I've recently taken this approach to emacs and org-mode. I'm a long-time vim user with a super-optimized vimrc, so I know what productivity feels like. I threw in spacemacs to reduce the learning…
Re: Interactive Vim tutorial
#217Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…
Sorry, but I think that's really bad advice. For one thing, it doesn't give new users any positive experience or reason to learn vim. If all you learn is to do things that are "pointless" (like learning hjkl), then you won't get any value out of vim. And if your way of learning is to do something that screws up your file and try to recreate how that happened, well, let's just say that every time I do something that s…
Anyhow, I'd be really interested to know if you agree with this characterization of your outlook.
Re: Interactive Vim tutorial
#218Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…
I always recommend 'Your problem with Vim is that you don't grok vi.' to new users starting out in vim [0]. You can never learn about the language of vim too early. [0] https://stackoverflow.com/a/1220118/2131903
Re: Interactive Vim tutorial
#219Earlier quoted context omitted.
You might be right. It's true that vim has a learning curve one way or another. On the other hand, if I want to show someone the "good parts" of vim, I try to show them something they can't do in another editor, rather than something that they can do (arrow keys). Even if I 100% agree that arrow keys are a worse experience, it's just not as convincing as something that can't be done outside of vim. At least in my exp…
Yeah, but that's a good way to sell vim. Once you've shown someone vim and whet their appetite, it's probably best to show them about 2 or 3 features and let them fill in the blanks while being at least minimally productive. I've recently taken this approach to emacs and org-mode. I'm a long-time vim user with a super-optimized vimrc, so I know what productivity feels like. I threw in spacemacs to reduce the learning…
Re: Interactive Vim tutorial
#220Earlier quoted context omitted.
I have had to type jk or kj very rarely that the egronomics of not having to move my pinky to the caps lock key every time that I need to escape is way worth the extremely minor problem of having to wait a second when I need to type jk. Optimize for the common and handle the exeptional.
The inoremap jk , inoremap kj configuration gets you back to normal mode only from insert mode. What do you do if you want to return to normal mode from visual mode or command mode? What if you want to type an abbreviation and expand it when you escape from insert mode to normal mode?
I press space or tab or enter or actual escape if I need an abbreviation and it happens to be at the end of what I intended to insert... I pretty much never rely on escape to do the abbreviations though because it's not at the end of what I want to insert anyway.
I also don't use visual mode enough to need to have an escape for it. you can certainly change the timeout on visual mode and add a visual mode mapping for that too if you want to do that. It seems you have a the attitude of this is the only "correct" way to do it. I don't really care if you use it or not... I was merely providing an alternative way to do what you want with the added benefit of it giving you an extra modifier key that you can bind other things to. You can also map it globally or for each of the handful of modes you want to escape from using it.