Friday, October 8, 2010

tmux

In one of my articles, I wrote about GNU screen. I was looking for a terminal multiplexer and GNU screen provided me that. After using GNU screen for a while, I heard of tmux, another terminal multiplexer which is newer and easier to customize. GNU screen's language for customization is very hard to understand. Every time I wanted to customize something, I just couldn't find the way of doing it is screen. However, in tmux the language for customization is very easy to understand. It is well documented. So, I switched to tmux from screen. Also tmux has many advantages over screen. Some of them are as follows.
  1. Supports vertical splitting of window
  2. Any number of splitting of window is possible
  3. Better session management
  4. Easy to understand customization interface
  5. Lighter and faster
One problem with tmux is it is not installed by default on linux machines. So, when I need to work at any remote machine I have rely on GNU Screen. 

viper-mode in emacs

I love vi for its simplicity. Vi is a very powerful tool. I use vim (Improved vi) to edit program files. It saves a lot of my time. But, vim has a drawback. Vim does not support Japanese input very well. In vim one have to use ESC key frequently. When you use scim-anthy to input Japanese, after pressing ESC you cannot use the movement commands because of the Japanese character inputs. You have to stop Japanese IME and then move around the file.

For the above reason, I use Emacs to edit Japanese files mainly latex files. In my lab, I need to make materials for meetings in Japanese. In Emacs you can use plug-ins for latex file editing. It makes editing latex files very easy. I am quite happy with my latex plug-in (Yatex) in Emacs.

But, Emacs functions to move around a file is little bit complex. Vim style of movement suites me more that Emacs style. That is why I was desperately looking for a solution to edit Japanese files in Vim seamlessly (Without turning on/off the IME). While searching I found the following thing.

Emacs has a plug-in named "viper-mode" which emulates vi in Emacs. The first time I saw this, I knew that this is the solution what I wanted. Using this plug-in, now I can use all the Emacs functions and at the same time I can move around the file and edit file in vi style. Its just like a dream.

I have just started using this. I need to learn few things to customize it to my likings. But for now, I am happy to find this.