Live data from Hacker News

Enhancements to Shell and Vim Productivity

danielmiessler.com

31–40 of 62 posts

Re: Enhancements to Shell and Vim Productivity

#31
post #22

Do people really not use caps lock? I use it every day, when I need to type more than one upper case character in a row. Like, every time I type NSString, not to mention CLOCKS_PER_SEC.

Caps Lock is also the most simple way to input Ç, À or É with a french keyboard. Not everyone needs it though.

Re: Enhancements to Shell and Vim Productivity

#32
post #21
post #3

Caps remap is my favorite. My pinky is much happier.

As any book about RSI will tell you, you should not use your pinky finger for pressing Ctrl regardless of whether it's mapped on Caps Lock or on the default key.

Which finger should you be using (with Ctrl in the usual place)?

Re: Enhancements to Shell and Vim Productivity

#33
post #27

As a Vim user, I've always been drawn toward using vi keybindings in bash. However, as a Mac user, all of the Cocoa text widgets more or less support emacs keybindings, so having a working knowledge of basic emacs movement commands has been very useful. The emacs bash/readline keybindings also have a really neat trick that the vi bindings don't -- keyboard macros! Ctrl-( to start recording, Ctrl-) to stop, and Ctrl-x…

How is Ctrl- different from using "q" in vi?

It's a matter of muscle memory. I used Vim exclusively for several years, and used vi-mode on my shells. Now that I've switched to emacs, my fingers are more comfortable using Ctrl- for commands.

Re: Enhancements to Shell and Vim Productivity

#34
post #26

"7. Use vi-mode in Your Shell" Tried this and gave it up. Your shell may be (somewhat) vi compatible but the applications you use mostly are not so you'll have to break out of the vi mindset at all sorts of inopportune moments. That, and modal editing, while perfectly alright for text editing, maps rather lousily to command line operations. You're much better off getting used to some basic Emacs-style key bindings th…

What I did, for example, was that I enabled vi-mode in my shell but also re-enabled some emacs-keybindings like CTRL-E and CTRL-A for ending and beginning of a command because I learned them like a lifetime ago when I first got used to the shell without even knowing they were emacs-keybindings.

But that way I am also able to hit ESC and do a / for a search, like within vim, which I am much more used to than a search in emacs. I found that way combines the best of both worlds.

Re: Enhancements to Shell and Vim Productivity

#36
post #22

Do people really not use caps lock? I use it every day, when I need to type more than one upper case character in a row. Like, every time I type NSString, not to mention CLOCKS_PER_SEC.

It's better than that: several quality keyboards do not even come with a CAPS LOCK key anymore.

For example if you're into quality switches, rated for 50 millions keypresses and providing a better tactile feedback than the typical $5 chinese mass-produced keyboard, you may want to shell out $250 to buy an Happy Hacking Pro 2 or a Realforce keyboard using Topre switches (you can have very good Cherry MX based boards for way less than that that said).

Some of these keyboards, like the HHKB Pro 2, don't even have Caps Lock. They have Control in place of Caps Lock.

So "Do people really not use caps lock?" is not the correct question. The correct question is: "Do programmers who touch-type and who spent time figuring out which keyboard switch they like really not use caps lock?" and then the answers becomes "yeah, most really don't use caps lock because Ctrl is so much more useful and so easier to use when it's located where caps lock typically is. To the point that companies building $$$ keyboard for that market don't even bother selling keyboard with caps lock" : )

"CLOCKS_PER_SEC" should be "CLO" and then auto-complete anyway. Regarding NSString, that's keypress, keyrelease (turning capslock on), 'n' 's' 's', keypress, keyrelease (turning capslock off). Doing it without capslock is keypress (shift), 'n' 's' 's', keyrelease. Which IMHO is faster but YMMV.

People touch-typing are alternating Shifts when needed when typing all-caps or typing lowercase and uppercasing the whole word using some vi(m)/emacs magic shortcut anyway ; )

Re: Enhancements to Shell and Vim Productivity

#37

Why is this article so Mac oriented? So here's tip 9: Use a nice Linux or similar machine with a pleasant to use clicky keyboard and a mouse which allows text highlight and middle click paste.

I've got a pleasant clicky keyboard, a mouse, a linux host (slackware) available in terminal with X11 apps piped over ... and OS X.

A long time ago, OS2 was better at running Windows apps than Windows was. The same is true for OS X running Linux ..

Re: Enhancements to Shell and Vim Productivity

#40

Why is this article so Mac oriented? So here's tip 9: Use a nice Linux or similar machine with a pleasant to use clicky keyboard and a mouse which allows text highlight and middle click paste.

You know I don't really get this sentiment. And I just think people hate on the Mac because they want to.

I never saw the appeal of Linux. Yes, it's free, and I can buy a cheap PC to run it on but why would I do that? My Macbook Pro has the best keyboard I've ever used (the 2008 "pro keyboard", not the chicklet keys Apple uses these days) and the trackpad is better than ALL trackpads out there. Seriously, Apple knows how to make trackpads. And on top of that, OS X is as much Unix as Ubuntu or any other distribution of Linux and I can do whatever work I would have done on Linux on my mac. If I don't have a command line tool, I just use homebrew to install it or build it from source if homebrew doesn't have that formula. And you know what I get including those nice things? The wealth of awesome OS X apps, like Textmate, Keynote, iTerm, Kaleidoscope, QuickSilver/Alfred, XCode, Pixelmator, Time Machine etc that are available. So I ask you, why would I use a Linux machine when OS X is supremely better in almost every way?

Post reply on HN