Showing posts with label kate. Show all posts
Showing posts with label kate. Show all posts

26 February 2013

345. Replacing gEdit with Kate

For some reason I can't get gEdit to auto-spellcheck as I type anymore. There's simply no option to do it. Funnily enough, my favourite editor vim does it without any issues -- but while I like vim and use it for most of my data processing, I prefer to edit e.g. html in gEdit. Habit, I suppose.

Anyway, while gEdit is great for everything else, it's given me an excuse to familiarise myself a bit more with Kate which I take is the KDE counterpart to gEdit. A counterpart that's on steroids like a lot of KDE applications (that's not necessarily a good thing -- see e.g. vim vs emacs -- but each to their own)

Another cool thing with kate is that you can run it in a vim compatibility mode. (Sure, there's also gVim for the real deal, but gVIM looks ugly on my computer and I'm a shallow person.)

1. Installation
sudo apt-get install kate

2. Associations
Edit ~/.local/share/applications/defaults.list
 text/plain=kate.desktop
 text/x-python=kate.desktop
 text/x-sql=kate.desktop
 text/html=kate.desktop
 text/dat=kate.desktop
 text/xml=kate.desktop

You can associate kate with as many formats are you want this way.

Create ~/.local/share/applications/kate.desktop
[Desktop Entry]
Name=kate
Comment=kate text editor
Exec=/usr/bin/kate
Type=Application
Categories=Office;Accessories;
Set dynamic word wrap, enable vim, override

3. Desktop
In gnome, either navigate through your menu to 'Main Menu' (under 'system tools') or, if you're running a stock gnome 3 without a menu, go to the overview mode (what you end up with when you put the mouse in the top left corner) and type in main menu.

Either way, go to accessories and tick the box next to Kate.

4. Set up kate
Start kate, go to settings, configure kate and set your defaults:
Enable vi mode

Set up automatic spell check

Activate Dynamic Word Wrap

And enjoy: