I love Kwrite. Basically when I do text things, I use vim for creation and Kwrite for editing. When it comes to moving large blocks of text and having to scroll quickly through a text file, a gui text editor is needed. Kwrite does good with syntax-highlighting and enables me to easily work on more than one text file at once. Although Kwrite is good by default, it takes a little setting up to get it to behave as expected. Here’s how I setup Kwrite.
Open up the configuration: Settings > Configure Editor
Turn on ‘Dynamic Word Wrap’. This allows words to be wrapped but doesn’t create a new line. This way you avoid having to scroll left and right to get to text.
Disable all borders. Line number isn’t really needed if you use the status bar (enabled by default), icon border I never really found a use for, and folding is nice but since Kwrite doesn’t remember this setting and going through file and collapsing everything, everytime, is more trouble than it’s worth.
Fonts and Colors
Kate’s built in color schema’s don’t have alot of options. I found someone who brought KDE 3.5 Kate’s color schema to Kwrite (I believe Kwrite is a trimmed down version of Kate). I wish I had the link, but I don’t so I’ll put it up here.
You’ll need to put the files in ‘~/.kde4/share/config’ and change ownership of them. I’m not sure if the katepartscriptrc is needed but it’s not going to hurt to add it. Be sure to back up the originals first though. You can change the schema with the ‘Default schema for Kwrite’ dropbox.
For tabulators think about doing ‘Insert spaces instead of tabulators’. In some documents you’ll find people use a mix of space for tabs and tabs themselves which can make for some odd formatting depending if tab spacing is different. I also like to ‘Highlight tabulators’. For ‘Tab width’ I found that ‘2 characters’ works good for being able to scroll text easily and still have easily discerable indentations.
Static Word Wrap
Static word wrap I leave off. Static word wrap forces line breaks when you reach the end of the line. This is good if you are say writing a man page, but not so good if you are building a script.
In Misc I like to ‘Highlight trailing spaces’. Sometimes I’ll leave an empty space at the end of the line and have to edit something else. When I get back, it’s a nice reminder that I don’t have to enter a space again.
Having ‘Backspace key in leading blank space unindents’ checked is a good idea if you use spaces for tabs.
Auto Completion Tab
I’m not sure even how auto-completion in Kwrite even works. Supposedly you are able to Ctrl-Space when you see a popup and the word will be printed. It’s never worked for me though and I find the popups semi-distracting so I disable ‘Auto completion enabled’.
Automatic Cleanups on Load/Save
Though hardly necessary, it does make a nice clean document when you select ‘Remove trailing spaces’.
Advanced Tab – Backup on Save
Kwrite does the same thing as default Vim does and leaves a nice clutter of backup files all over your filesystem. Though it is nice enough to have a backup, I’m usually good enough to remember to backup important text files before I edit them. Uncheck ‘Local files’ to avoid a nice trail [A-Za-z0-9]~ files everywhere.