Text editors are small tools that are often used to create big things: stories, websites, applications. While an average user might think they’re “all the same,” text editors can differ greatly, and those with time-saving features are very much appreciated by programmers.
We offered a look at Linux tools for writers, and this review presents a tool aimed at people who write code (though you can write anything you want with it). KKEdit was inspired by BBEdit, a powerful OS X application, and it brings the best of its features to Linux in a lightweight, fast, GTK2-styled package.
KKEdit is easy to install if you’re an Arch Linux or Ubuntu user. The former offers it in AUR, and the latter in an unofficial repository:
If you don’t want to add a new repository to your system, just visit the Launchpad website and download the package in .deb format, then install it with
sudo dpkg -i packagename.deb or by double-clicking its icon in the file manager. Note that this way you won’t get automatic updates for KKEdit. As usual, the source is available on the official KKEdit website for those who wish to compile it.
Setting Up KKEdit
The “Preferences” dialog is probably the first thing you should open after launching KKEdit for the first time. Here you can adjust KKEdit’s appearance and behavior, toggle automatic indentation, and do line and syntax highlighting, word wrapping and automatic code completion. To add icons to the main KKEdit toolbar, click on them in the lower bar in this dialog. To remove them, hold “Ctrl” and click on them in the upper one. Hovering over each icon will show a tooltip description of its function. The “Text Style” tab lets you set fonts, basic colors, themes and keyboard shortcuts.
Further customization can be performed in the “Tools -> Manage External Tools” dialog where you can connect various applications and scripts with KKEdit and use them when working on your text files. For example, you can add a script that counts words and characters and run it on your opened files in KKEdit.
What’s So Good About It?
You’ll notice that KKEdit doesn’t look strikingly different than any other text editor, and it supports basic features like tabs, tab sorting, spellcheck and syntax highlighting. Right-clicking on any tab lets you define settings for that particular tab, and there’s also the “Split View” feature.
However, the best thing about KKEdit are the small, practical features that come together and give it an impression of a really handy text editor. Bookmarks and line-jumping are perfect examples of this. You can bookmark any line and quickly jump to it from the “Bookmarks” menu, or just enter a line number to go to it automatically. Bookmarks can be saved (and restored) for each session with the “Save Session” option, and you can quickly remove them all at once in the “Bookmarks” menu.
Programmers might be happy to hear that KKEdit supports regular expressions in its “Search & Replace” function, and you can define the search depth in “Preferences.” KKEdit can look for a search string in all open files or even in all files from the folder of the active text document. The “Functions” menu activates when your text document contains defined functions, and it lists them all, letting you quickly jump to them and find their definitions. KKEdit can also search for definitions in other opened files and automatically switch to their tabs when it finds them.
Apart from this, KKEdit can open the “include” file that the text document references, as well as open files as hexdumps. If you work with GTK and Qt frameworks, you’ll find KKEdit suitable to your needs because it lets you browse the documentation and search for API keywords directly from the context menu. In case you don’t have documentation packages installed, the search command will just open a Google results page for anything you select in a text.
KKEdit straddles the line between a bare-bones, too basic text editor usually shipped as the default on many distributions, and a bloated piece of work that has all the options you need and a dozen more that you don’t want. It doesn’t have many dependencies and can be themed to look good on any desktop environment.
However, even though it’s inspired by BBEdit, it lacks one of the features which I find essential – code folding. I understand that it was supposed to be lightweight, which is why it doesn’t come with features like HTML code cleanup or diff file comparison, but those who like to neatly organize their code might be put off by this particular omission.
Still, if you don’t mind the developer’s not-so-subtle calls for donations within the application, KKEdit is a great choice for a budding programer or someone who wants to try a new text editor to refresh their workflow.
What’s your favorite text editor for Linux? Share your recommendations in the comments.