Registered Member
|
Hi all,
This is my first post, although I am a long-term and appreciative user of Kate, my preferred text editor on Linux+KDE. It has a lot of useful features which help muchly with coding and writing. I am having a problem at the moment though: I am writing PHP code for a project whose coding standards require indentation of four spaces. Usually, I indent PHP code with tabs displaying at eight spaces, which works fine in Kate. I tried to change to four-space indentation under Settings -> Configure Kate -> Editing -> Indentation, where I set "Indent using" to the radio button "Spaces", with "Indentation width" set to "4 characters". This works as expected in new files not yet saved, but in existing PHP files - even those already using four-space indents - and in new files saved with an extension of ".php", the tab key continues to insert a tab rather than four spaces. Am I missing a configuration option? How do I configure Kate to indent PHP files in particular with four spaces? |
Registered Member
|
I've found a workaround: set the indentation for individual PHP files via the status bar's indentation indicator/selector.
By default, for PHP files, it reads "Tab Size: 8". If I click on it and set "Indentation Mode" to "Spaces", then click again and set "Indentation Width" to four, then four-space indentation works in that file as expected. I have to do this per-PHP file though, every time I open or save a new one, so this is not an ideal workaround - I'm still curious to know whether (and if so how) this can be set as the default for PHP files. |
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]