Avoid ESC in Vim

OK, this is one of those times when I’ve been humbled again.  I’ve been using Vim for over a decade now, and once in a while it occurred to me that using ESC to exit to normal mode is NOT the most efficient thing ever.  Maybe my little finger is too little, or maybe my keyboards are too large.  But reaching ESC with while in the middle of crazy typing session broke my concentration a few times.  But somehow I just thought that it is one of those most natural Vim things that I had to get used to.  Today, I came across something genius that told me that I don’t have to.  If you have the same problem, edit your .vimrc file and add the following lines:

" exit to normal mode with 'jj'
inoremap jj <ESC>

Once you load your new configuration, typing ‘jj‘ in insert mode will be equivalent to press ESC key.  Brilliant!

Vim adventures

Vim is quite famous for being the best text editor in the world.  However it has quite a learning curve, especially for people who don’t touch type and who aren’t much interested in their own productivity.  Over the years, there were a few efforts to help the newcomers learn the basics.  But, I think, nothing came close to the amazing game Vim adventures – a maze navigation game, that uses Vim controls.

GitHub Enterprise announced

GitHub – the place to host and manage your source code – announced the release of GitHub Enterprise. GitHub Enterprise is a self-hosted version of GitHub. What I find the most interesting is the pricing.

GitHub Enterprise is priced at $5,000 per 20 users, per year. It comes with everything you need in one tidy package: code browsing, code review, issue tracking, wikis. No extra software to buy, no extra software to install, no extra software to manage.

The target is not on the disk space (understandable, with your own severs) or private repositories, but on the number of developers. $5,000 per 20 developers per year is $250 per developer per year, or about $20 per developer per month. That’s not too much, especially when compared with the salaries paid to the same developers each month. A fraction of the salary.

So, not only GitHub Enterprise is an excellent option for those companies that cannot use third-party hosting for source code, but it is also a Christmas present for those companies that work on a lot of projects. With private repositories, the price of a regular GitHub organizational subscription can go up pretty fast. With GitHub Enterprise you’d be able to have everything in-house for a tiny fee, compared.

It’ll be interesting to see how well this business will go for GitHub. It sounds viable to me. Convenient and not too expensive. With easy OVF-based installation, that would work on many virtual machines (VMware, VirtualBox, etc), with additional features for enterprise integration (LDAP!), I don’t see why not.

What is a week?

Today morning I had a brief conversation with a coworker. As many office works do on Wednesday, and not only on Wednesday, we were dreaming of the upcoming weekend. Partially, as a joke, we said that it would be nice to have an extra day in a week that nobody else would know about. We could then rest and relax in the middle of the week without anyone noticing our absence.

That reminded me of the system that I’ve built a few years ago. It had to do with schedule generation for a bunch of people who were working shifts. The rules of who can take which shifts were constantly changing. And so, in order to build the most flexible system that I could think of, I implemented one which had a variable number of days per week. You could easily build a week of just three days or eight or ten. On top of that, days could be easily rearranged in order. That was a fun setup, but eventually it proved very useful. I left the company many years ago, but I hear they still use the system with just a few extra tweaks.

Once I remembered that system, it got me thinking more about the definition of the week. Which brought me to the history of how did we come to have a 7 day week. The best resource for things like that is, of course, Wikipedia. Surprisingly, the page is not very long. But even as it is, it still mentions weeks used in different societies at different times. Have a look at it to learn about 3-, 4-, 5-, 6-, 8-, 9-, and even 10-day weeks. It’s quite fun.

Given that time is very abstract, I find it interesting how tightly we hold on to a 7-day week standard.

tmux – Linux terminal multiplexer

I stumbled upon a very useful tool – tmux.  It is a terminal multiplexer for Linux.  If you are using Terminator or screen, you’d want to check it out. If you don’t use either of those, you definitely need to check it out.

With tmux, you can have a single shell in which you can create multiple sessions.  You can split each session into a number of windows.  You can detach from tmux and all your sessions and windows will remain open and running, much like with screen.  Later you can attach back to them again or you can start a totally new instance.  The interface is keyboard driven.  It is simple and intuitive, but as with any other tool, you’ll need a bit of time to get used to it.

If you are a Fedora Linux user, all you have to do to try it out is: ‘yum install tmux‘.  If you can read Russian, here is a quick introduction to most useful shortcuts.  Check the official website for the rest of the documentation.