8 ms·
I didn't test the thing (I have my working setup, but wanted to see what this was about), but one suggestion anyways: the screenshot shows a welcome message whe
by gkya 9y ago
I didn't test the thing (I have my working setup, but wanted to see what this was about), but one suggestion anyways: the screenshot shows a welcome message where it says roughly "Hit C-h h for help". I'd suggest you mention "C-h t" there too, it should be the first communion of every new Emacs user.
- WalterGR 9y agoI wonder how many people press C-h t, get to the following: C-f Forward one character C-n Next line C-b Back one character C-p Previous line ...and close Emacs, never to open it again. The tutorial goes on to say: When you get used to these keys, they're faster than their more familiar equivalents in other applications (Home, End, Ctrl+Left, etc.) because you don't have to move your hands from the touch typing position. That's such ridiculous micro- and premature optimization - especially given that, since Emacs predates modern conventions, almost nothing is natively familiar - that it boggles the mind.
- fiddlerwoaroof 9y agoEmacs keybindings are a standard of their own: they generally work in the shell and other readline based command line utilities. They also work in Cocoa text entry widgets on the Mac.
- gkya 9y agoThose are the keys a usual Emacs users uses maybe hundreds of times in a day. Every laptop I have owned has its arrow keys and Home-PgUp-PgDown-End block in a rather unique place, so even if it's a minor optimisation (it's not), accumulatively it's a very important one. It'd be like replacing a heap allocation with a stack one in a hot function, if that example works like I think it does.
- coldtea 9y ago>so even if it's a minor optimisation (it's not) Has it been measured? I mean, if they have actually measured: 1) the speed difference of using those shortcuts vs arrow/page-up and co when merely typing 2) the same speed difference as a percentage of the overall programming process 3) the impact of such speed difference in programmer productivity (speed translated to results faster or better code with fewer bugs). Or it's just cargo cult?
- gkya 9y agoI don't know how can I go about measuring this (tho should not be that hard to come up with a scheme), but I'd rather not bother. One fact is that, on the keyboard I'm looking at, which is a laptop keyboard with a numpad, the home-end bunch are above the numpad, and the up arrow aligns with the enter key, the right arrow becoming a part of the numpad block, right under one. I have to move my hands to be able to use them. I can use the arrow keys with my right pinky, but that requires contorting the hand. Moving my hand either to the home-end row or to the arrow keys takes about a second, and if I'm not looking at them, I usually hit the wrong key, (usually PrtSc instead of home, so also some surprise there), whereas C/M-{FBNPAEfbnpae} are about always right under my hand. I write both prose and code in Emacs, each and every day, and I haven't counted, but I use those keys quite a bit when typing stuff in. Assuming I use them a hundred times a day (quite low of an estimate), I save about 200 seconds/day. Yes that's marginal, in numbers, but in effect, it makes it so that typing is way less burdensome. Not having to relocate the home row enables me to type more accurately without having to see where I am on the keyboard, and to delete mistaken characters when I haven't correctly located F and J under my indices, and I count that a gain, adding to that the many other keybindings in Emacs that use the FBNP keys in some ways.
- reaperducer 9y ago> Or it's just cargo cult? Yes, it is. Like much of the rest of programming. I think it's weird for an IDE to tell me which command keys to use. It should have a set of default keys, and ideally those could be remapped as well. The biggest benefit of directional keys (up, down, home, end, etc...) is that they are universal across keyboards and languages. Control-F may be great if you're on a VT100 terminal, but maybe I'm on an AZERTY keyboard, or one of those funky square keyboards. Or a Chinese keyboard that's largely input by writing characters on a little pad. Or on a Mac using gestures or Ink. Or a dozen other possibilities. If I was only programming in Pascal and only on one computer in one environment for the rest of my life, then it would make sense to learn those keystrokes. But like is more complicated than when those were first coded.
- thaumasiotes 9y ago> It should have a set of default keys, and ideally those could be remapped as well. It sounds like you may not be aware that this describes emacs?
- jjaredsimpson 9y agoAnd yet I spend a summer immersed in Emacs and the thing I miss most is the navigation commands and incremental search. It's not premature in my opinion.
- zeveb 9y agovi, too, uses touch-typing home-key navigation. I don't know if I'd trust a developer who claims that both emacs & vi are wrong.
- deleted 9y ago[deleted]
- jolmg 9y agoWell I can tell you from experience that it's not a micro-optimization, unless you compare it to vi(m) where the movement keybindings are optimized to h, j, k, and l. Being that movement across the text you're editing is such a common action, it's become incredibly annoying when you have to move your hand away from the home row and search around for the arrow keys with your hand. Different keyboards have them in different places and sizes, so you have to make a slight pause to think of what keyboard you're using to know where to search. I've caught myself having to look at the keyboard sometimes just to find those damn arrow keys. In fact, sometimes they're so badly positioned in the keyboard, that I just prefer to use the mouse instead.
- tomjakubowski 9y agoNothing stops you from using the other keys (cursor, home/end, pg up/dn): they're all bound by default to do those actions too. Personally, I gladly use the shortcuts that don't make me move a hand to the far edges of my keyboards. (one of my keyboards doesn't even have cursor keys, and I get along fine)
- cup-of-tea 9y agoWhat part of "when you get used to these keys" do you not understand? Keeping your hands on the home row is absolutely quicker than using those other keys. So much so that my main keyboard doesn't even have those other keys because I don't need them any more.
- abhirag 9y agoThe beauty of Emacs lies in how configurable it is. I use Emacs in two modes, when editing a program I use native key bindings (Cntrl-c, Cntrl-v, Cntrl-a, Cntrl-z etc.) and to execute commands I use vim key bindings. I absolutely love this setup but many people here might absolutely hate it, but what matters is that Emacs doesn't care and can be used by people with diverse muscle memories :)
- Shinmera 9y agoThe help buffer includes its own tutorial that is geared towards the essential parts of Emacs and Lisp editing. I feel like Emacs' own tutorial only distracts from what this package was meant to be focused on.