Skip to main content

Vim vs. Emacs

Using both Vim and Emacs for quite a bit of time I have finally made a decision what editor to stick to. I started with Emacs, but gave Vim a try and it really satisfied me.

And here are the points relevant for me:

- It is deliciously easy to make key mappings in Vim.
- Vim color schemes work both in GUI and console.
- Vim config works almost identically for both GUI and console.
- Sessions in Vim are much better stored than in Emacs (I mean, even tabs and windows are saved along with whole the environment, not only buffers).
- By default Emacs lacks modality and this is the biggest disadvantage. Default keybindings on Emacs are just horrible (even physically painful, to be honest), I really see no reason for this complexity over simplicity given by modality.
- Even on my MacBook Pro with 8 GB RAM Emacs happens to be slow somehow.
- Vim has tabs out of box. A small number of tabs is not evil, when you have kind of 50 buffers open :)

However, there are things I definitely liked in Emacs:
- ELPA. Of course, I use vundle, but ELPA makes me kind of envy Emacs users.
- Nice buffer management out of box.
- Elisp. I have never tried vimscript and I hope integration with Python will be much improved in Vim 7.4.

There is also an interesting analogy between Vim and Emacs. Vim commands prefixed with ':' are like Meta-x commands in Emacs. However Emacs doesn't allow commands arguments before RETURN.

To conclude, Emacs has better eco system, but it requires too much configuration to get what I need from it (first of all, I mean modality), while Vim originally was better designed for day-to-day usage. Of course, there is nothing that is in Vim that cannot be done in Emacs. So if you are fine just with tuning the editor, you may want to choose Vim as I did. However, when you actually want to write an editor for your needs then, probably, you should go with Emacs.

Here are my configurations for Vim and Emacs with Evil, forks of Vim netbeans and Emacs starter kit respectively.

Popular posts from this blog

How to program SPI flash memory on Digilent Nexys4 and other 7th generation devices using Vivado 2014.x

Update: The methods described below work also on Vivado 2015! Please let me know if you had any issues with other Vivado versions. The information in the official user guides and tutorials seems to be fragmentary and sometimes out-of-date, that's why I decided to fill in this gap, not waiting for the official Xilinx updates. Our goal is to show how to program the SPI flash memory of the 7th generation Xilinx devices with Vivado 2014 on example of  Nexys4  board. Note:  before we start, we assume you already have a working project, that means the generated bitstream file works on your device. If not, you may want to go directly to the  Program the SPI flash  section to test your Nexys4 board with prepared .mcs file. Plan Configure the hardware to work with SPI flash memory Regenerate the bitstream file Convert the bitstream file into the "Prom" format Program the SPI flash Boot the device Configure the hardware to work with SPI flash memory Open the synth

How to fix 'ImportError: cannot import name QtCore' on Debian Linux

What to do if such import error occurs? >>> import PySide >>> from PySide import QtCore Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: cannot import name QtCore 1. Try to locate where your pyside is installed: $ locate PySide ... /usr/lib/python2.7/dist-packages/PySide /usr/lib/python2.7/dist-packages/PySide/ /usr/lib/python2.7/dist-packages/PySide/__init__.pyc /usr/lib/python2.7/dist-packages/PySide/ /usr/lib/python2.7/dist-packages/PySide/ /usr/lib/python2.7/dist-packages/PySide/ /usr/lib/python2.7/dist-packages/PySide/ /usr/lib/python2.7/dist-packages/PySide/ ... Hint: use this to update your file index: $ sudo updatedb 2. The solution is easy: add this to your ~/.bashrc (or ~/.<shell>rc you actually have). export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/python2.7/dist-packages/PySide

Inkscape extension example

Recently, when preparing figures for publications using Inkscape, I decided to simplify my life. Some of the figures can be described as 2x2, 2x3, or even 2x6 grids. Sometimes it is very awkward to rearrange them if you decide to switch from 2x6 to 3x4 or vice versa. It would be nice to have an Inkscape extension, which will minimize the efforts. For the sake of simplicity we assume that all the elements are equal in width and should be rearranged symmetrically with respect to the vertical axis. Also, the element should be ordered according to its relative to the other elements location. The top left element is the first and the bottom right is the last one. So for example, you can visually prepare the elements and then tidy them up with a single click of our magic button. Hint : before developing a similar extension, you may want to check the standard Align and Distribute tool (Ctrl+Shift+A). Before writing any actual code let's take a look at some official Inkscape extensio