Wednesday, September 9, 2009

Looking for a Replacement for Notepad++ on Linux? Try Geany!

There are many nice text editors / IDEs out there for Windows, Linux, and Mac. On the Windows front, one of the best (IMHO) is Notepad++.

Unfortunately, NP++ is not available for Linux. Sure you can get it working via WINE, but I'd rather have something that provides similar features that just works in Linux. Notepad++ uses Scintilla as it's core editing component.

Luckily, there are several IDEs for Linux that use Scintilla, so the features and feel of Notepad++ are not lost to the Linux world.

Geany is the editor that I've been using lately (along with vi/vim). Currently at version 0.18, Geany has a long list of features and supports many of the common scripting and programming languages. One of the primary goals of the development was to limit dependencies, thus Geany only requires the GTK2 runtime libraries and is agnostic to the desktop (Gnome, KDE, etc...).

Here are some of the features listed on the website:
  • Syntax highlighting
  • Code folding
  • Symbol name auto-completion
  • Construct completion/snippets
  • Auto-closing of XML and HTML tags
  • Call tips
  • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list)
  • Symbol lists
  • Code navigation
  • Build system to compile and execute your code
  • Simple project management
  • Plugin interface (see Plugins)
Up to now, I've been using KDevelop (in Gnome :-) as my IDE. It's a nice editor, but a little clunky for my scripting needs. So far, I'm very impressed with Geany.

If you are running Fedora, Geany and various plugins can be installed using the following Yum command:
$ sudo yum install geany geany-plugins-*

If you'd like to stick to Gedit, you can pimp it out using this guide. The advantage here, Gedit is available on most distributions right out of the box (assuming a graphical install).

2 comments:

FlakRat said...

One note, there aren't any official RPMs for RHEL5 / CentOS5 but you can easily build the rpms using the SPEC files for Fedora:

geany*.src.rpm: http://koji.fedoraproject.org/koji/buildinfo?buildID=127464

geany-plugin*.src.rpm: http://koji.fedoraproject.org/koji/buildinfo?buildID=127468

The only problem I ran into was when trying to install the RPMs, the geany-plugins-geanylatex rpm fails to install on EL5 because it is not able to find the appropriate LaTex / tex package.

Looking at the spec file reveals this requirement:

Requires: tex(latex)

According to https://fedoraproject.org/wiki/Packaging_tricks#Installing_TeX_files_.28unvetted.29

tex(latex) is a 'virtual package' that apparently RHEL5 does not understand.

This may require an %if in the spec file to handle el5 systems.

Chankey Pathak said...

Notepad++?
Why to look for that in Linux when you have VI/VIM (The best editor)