Kwrite Setup

HeaderI 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.

Additional Kwrite Color Schemas

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.

Intentation Tab

Indentation Actions

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.

About Gen2ly

<3's linux

Posted on 2009-09-23, in KDE, Linux. Bookmark the permalink. 2 Comments.

  1. Have you ever tried GVIM? Using the mouse along with vi’s editor-mode-paradigm-thing really is great, you’ve got the delete buffer and awesome undo, visual search and replace etc etc. When I saw your screenshot it reminded me of my own setup, so here’s a screen shot of my editor and my .gvimrc making it that way


    # .gvimrc
    colorscheme desert

    set guioptions-=r
    set guioptions+=l
    set guioptions+=b

    set guifont=Monospace\ 12

    set nowrap

  2. Yeah, I tried it, but I got to admit it that that was quite a ways back and at the time it didn’t understand how vim really worked. I’ll give it another shot and see how it goes.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 58 other followers

%d bloggers like this: