Wednesday, September 17, 2008

Gvim vs Emacs

The holy war of text editor - Gvim vs Emacs. Which one is better? Difficult to say. Depends on your requirement. Vim is small and great. Emacs is large an great. Both are great. One is small in the size, other is large in the size. Gvim is GUI version of vim. If you want to quickly edit a file and mostly want to remain in the command mode - vim is the better choice. It's real fast. Default vim is much easier to use then default Emacs for programmers. If you do elisp programming in Emacs then you can do an anything you want. Because, elisp is kind of programming language. You can write functions in elips and bind to any suitable key you want. That is where Emacs becomes extremely powerful. However, if your job requires mostly to edit existing code vim would be better choice. Emacs is huge. Very huge. It's not only designed just as a text editor. Vim is purely text editor. Emacs can act like operating system. Lol. Emacs has everything. The main idea behind Emacs was to put everything into one editor so that user will never have to exit from it. You can send receive email through Emacs. You can read news inside Emacs. etc. So, Emacs is not just a text editor. It's much more than that. One thing I didn't like about Emacs is ctrl key. To type any command you have to press ctrl key. This is too much. However, you can always map them to functional keys but there exist only 12 functional keys. Hitting control keys always, it bugs(to me). Things I don't like with vim is every time switching between command and insert mode. Indent capability if vim is poor. Emacs is smart in indenting. Only problem I see with Emacs is the control key. In vim if you are in command mode you don't have to hold control key. Then any key can act like a command. That's not the case with Emacs. In Emacs to invoke a command you have to hold control key always. There is no way out except mapping (up to 12 functional keys). That is why Vim is great when you work in command mode. Working in Emacs is too slow as compared with command mode in vim. From undo point of view both are same. Both provide unlimited undoes and redoes. From block editing point of view Vim is slightly better than Emacs. When you select a block in vim it clearly highlights, whereas in Emacs you have to imagine the block. Goshhh! From shell point of view emacs is better. Working with Emacs can be enjoyable provided you write lots of elisp function in your .emacs file (which I don't have). Emacs has a viper mode which can act like vim. It can emulate vim. I used it once. Was fun using vim inside Emacs. Other way round possible? Emacs inside Vim? I think it would be good idea to make an editor which combines the properties of Emacs and vim.

2 comments:

Unknown said...

cool..

ScriptDevil said...

I know this is a really old post. But you can use CUA mode to highlight the block