Making VIM the default text editor on Ubuntu

In my never ending quest to find the ideal text editor here is another installment. Since I have been using VIM as my default command line editor for years I thought I give it a try for basic GUI editing as well.

VIM Logo

Install and set desktop app & icon

sudo apt-get install vim vim-gnome
sudo wget --output-document=/usr/share/applications/gvim.desktop https://raw.github.com/leogaggl/misc-scripts/master/gvim.desktop
sudo wget --output-document=/usr/share/icons/hicolor/scalable/apps/gvim.svg http://gfxmonk.net/images/vim-logo/vim-logo.svg
sudo update-desktop-database

Set MIME defaults

vim ~/.local/share/applications/mimeapps.list
#add or edit the following mime type and add others as needed
text/plain=gvim.desktop;

Finding a Notepad++ alternative / replacement on Ubuntu

One of the most important utilities on any computer is a decent text editing tool. Since there are as literally hundreds of text-editors out there you would think it is an easy task to find a similar one for each platform.

After years of trialing on various Windows platforms I have found Notepad++ to be the most useful of them all (closely followed by EMEditor which I used for years before Notepad++). Since I have now switched to Ubuntu completely it was necessary to find a permanent alternative on that platform since Notepad++ is only available on Windows.

The requirements list in order of priority:

  1. Fast & Native (reading NOT Java or similar runtime requirements)
  2. Excellent Search & Replace (which is where most fail ….)
  3. Lightweight
  4. Simple GUI (reading NOT an IDE)

Potential Candidates

Scite

Scite was my first try since it is based on the same engine as Notepad++. I have used it for a number of months but was never really happy with it. Issues with “Find in Files” functionality have been the final issue that make me move on. http://www.scintilla.org/SciTE.html

Scite Screenshot

Geany

I came across this one very recently and after a short trial period grown to really like it. Apart   from it’s silly name and very ugly icon it really has got the nicest overall balance of speed and functionality. And most importantly it also has very decent in-built search & replace functions. This includes “Find in Files” functionality which actually works. http://www.geany.org/

Geany Screenshot

Vim (Cream)

Since vim is my command-line text editor of choice for years I was giving the GUI version a try next to Geany. However since I am not a total vim freak (never had enough time to learn all the power of this tool) I decided to stick to a dedicated GUI text editor for long editing tasks (HTML, CSS coding) and keep vim for when I am on the command-line or a headless server.

Gedit

Being the default editor in Ubuntu I have used it a bit, but always found it very sluggish and not very intuitive to use. Apart from the fact is installed by default I did not find many things I liked about it.

Note: sometimes the find and replace needs are outside of the capabilites of any text editor and you have to resort to a specialised tool. As a GUI I have always found Regexxer (http://regexxer.sourceforge.net/) very useful. Otherwise there is always the full power of grep and sed.

BESPIN – another nice one from Mozilla.org

Getting excited about a new text editor of all things is not something I like to admit to easily, but in my line of work (although less and less is actually doing hands on coding) text editing is an important part.

That’s why I checked out the BESPIN project as soon as I heard of it. The prospect of being able to edit your files from anywhere is very appealing to me since I spend a lot of time away from the desk and on devices that not always have good text editor (let alone all the files necessary). The thought of being able to edit files from a netbook while on the run is coming to mind straight away.

So far (even though this is a 0.1 ‘techo-preview’) I really like what you see. Not something that the average word processor crowd would find appealing or easy to use, but for somebody that is familiar with (specially *NIX) text editors it is easy to pick up and I can definitely see lots of potential there.

Bespin Dashboard
Bespin Dashboard
Editor Interface
Editor Interface

There are some important features still missing to make it truly useful in practical conditions, but I am sure they will be addressed in future revisions and it should be fairly easy to host your own since it’s basically Javascript & HTML5 and an Open Source project.

Great work by these guys:

Keep it coming ! Soon …