6 ms·
Vim enlightenment for me was learning to use it with all the default settings. Everywhere I go, it’s already set up just the way I like it.
by synu 4y ago
Vim enlightenment for me was learning to use it with all the default settings. Everywhere I go, it’s already set up just the way I like it.
- adlpz 4y agoThis also makes it easier to use the vim keybinding you find in many IDEs, as you are not relying on more arcane or customized bits of vim itself, but the general concept and common idioms.
- roland35 4y agoTotally agree. Although wherever I go, I map "jk" to <ESC> since I find that so much easier to enter Normal Mode.
- synergy20 4y agokj for me,thats all i need on servers
- vaylian 4y agoLet me introduce you to ctrl+c which is the same as <ESC> in most cases (notable exception: visual selection mode)
- czx4f4bd 4y agoCtrl+C requires taking your fingers off homerow and pressing two keys at once, though. Granted, escape also meets those criteria if you map it to the caps lock key, which I do. The jk mapping is still useful in the rare occasions I use vim on my phone, though.
- robervin 4y agoI remap caps lock to ctrl on my OS which does make it a little more ergonomic, but I still prefer your method. Although, whatever wizard taught me vim and gave me their beginner cheat sheet had jj instead of jk.
- cassepipe 4y ago+1 for remapping Caps Lock to Esc. It is easily done in GUI settings in both MacOs and most Linuxes and it is quite useful to have it there OS-WIDE. In the rare cases I need to Caps Lock it is still available by pressing both shift together (there are various Linux options around that) I never bothered to have it map to Ctrl on holding the key in addition of Escape on pressing but it is easily done. There's at least on blog post about that if you search HN
- fsh 4y agoctrl+[ is identical to <ESC> and much easier to reach.
- zhengyi13 4y agoIn my case, I agree, but when I asked about this key combo once elsewhere, a number of folk pointed out that this is true for the standard US QWERTY layout, but not necessarily so for various EU or other layouts.
- godelski 4y agoHow do you program if you have a hard time accessing array elements?
- bitofhope 4y agoAltGr+8 is reasonable enough that I don't feel like learning a new layout. Ctrl+AltGr+8 is involved enough that I might as well press Esc. A lot of software developers are unaware of the AltGr[1] key or even assume US ANSI layout altogether so as a user I have been trained not to take keybindings involving that layer for granted. As a real world example of similar issues, there's piece of software (I think it was telnet or mosh, but I apologize if I misremember) where Ctrl+^ is used as an escape sequence. This doesn't work for me, possibly because caret is a dead key[2] on my keyboard. For some reason, perhaps related to using scancodes instead of key codes, Ctrl+6 happens to work in that application. [1] https://en.wikipedia.org/wiki/AltGr_key https://en.wikipedia.org/wiki/AltGr_key [2] https://en.wikipedia.org/wiki/Dead_key https://en.wikipedia.org/wiki/Dead_key
- sodapopcan 4y agoctrl-c is not the same as escape. ctrl-c doesn't trigger the InsertLeave autocmd or abbreviations. This may not matter to everyone but it's worth being aware of.
- roland35 4y agoThat's what I love about vimmers. We all have our preference on something as simple as what the escape key should be :D
- RMPR 4y agoI enter normal mode with alt+j, the best thing is that it works with vanilla vim in the terminal.
- juped 4y agoNow remove the silly "m" and use generic system vi!
- rectang 4y agoI persisted with this approach for a decade. Enlightenment came when I let it go. Even after 10+ years of daily use, I never managed to make navigating via hjkl work naturally with my brain — I need “up” to be physically above “down”. So I set up key bindings for the classic “inverted T” formation, dealt with the secondary effects, and I’m much more comfortable. https://github.com/rectang/dotfiles/blob/30e0a41714c34416f108a15fbd2cdc461048f807/vimextra#L113 https://github.com/rectang/dotfiles/blob/30e0a41714c34416f10... Dare I say I use vim more like it was intended to be used with this new setup, as my right hand remains in place and is not constantly flying to the arrow keys and back. Now I struggle a bit when I have to work on a stock vi, but that’s a very small part of what I do.
- dmix 4y agoI use hjkl to scroll 90% of the time when using my browser. Having it on the middle of the keyboard where your hand rests make a lot more sense to me than weirdly angling your hand at the bottom right of my MacBook.
- BeFlatXIII 4y agoI just wish hjkl scrolling worked for those of us who do not use QWERTY
- Taywee 4y agoI used hjkl scrolling for about a decade with Dvorak. In fact, I learned to use Vim for the first time on Dvorak. The muscle memory makes it work just fine, even when not all the keys are on the home row.
- yjftsjthsd-h 4y agoIt, um, can, but you have to kind of not pay attention and pretend that the letters are somehow important and ignore what your fingers are actually doing on the keyboard. At least n=1, my brain was willing to accept that j=down and k=up and not worry about the fact that they're not even next to each other. That said, if I could go back in time I would tell my younger self to either use vi/m or non-qwerty, but not both.
- bkirkby 4y agoI stick with regular vi for a very long time because of this. I was a systems consultant way back when and I'd have to work on several variants of unix that had a mich-too-long lag time on getting vim ports. Iirc, sparc was the unix that took the longest in getting a gnu tools pipeline, so once they had vim and I could reasonably expect most of my customers could install it, I switched. I now do a pretty standard config (mostly use the vim plugin in VSCode since I'm a software dev nowadays).
- osigurdson 4y agoI do wish the defaults were better however. The following changes help a lot. set tabstop=3 set shiftwidth=0 set autoindent
- exegete 4y agoI'm at this point. Learned vim in grad school where I was ssh'ing into systems all the time. I tried a variety of plugins but none of them have stuck for me. Now in industry everyone uses VS Code or something like it and I just can't get into it. Everything I need to do is on the command line (git, run tests, etc). Having been a Linux-enthusiast for quite some time helped me with needed command line tools as well (now I'm using a Mac at work, which is similar enough where it matters).