Friday, October 8, 2010

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.

No comments:

Post a Comment