My goal is to set Kate up to work properly on Python files but to use different settings (tabs not spaces) on other documents. I'm sure others are doing this, but I can't figure out a convenient solution. I appreciate any advice.
Kate has settings for indentation here:
- Click the Settings menu
- Click "Configure – Kate"
- On the right expand "Editor"
- Click "Indentation"
One option is "Default indentation mode". One choice for that setting is Python. However, I cannot find where to set (or even display) the options used for the Python choice.
Furthermore, it is not clear what is the interaction between "Default indentation mode" and the explicit settings for indentation on that page. Does one override the other?
Best Answer
There are multiple ways to achieve what you want. In order, Kate is doing the following:
mode
, can be configured inSettings
>Configure Kate
>Open/Save
>Modes & Filetypes
tab. Choose your filetype, e.g.Scripts/Python
and then add a modeline like this:kate: indent-pasted-text false; indent-width 4;
.kateconfig
files recursively upwards. If found, it will apply these settings10
lines of the file and write e.g.:#kate: indent-pasted-text false; indent-width 4;
All this is also described in the Kate Handbook.