I got some files have mixed indentation, is there any way I can automatically convert the indentation in Kate?
7 Answers
Try to do Ctrl + A to select all text and then Ctrl + X to cut it and Ctrl + V to paste it back. It will automatically format the indentation accordingly to your settings in Kate configuration.
- 899
If you do Tools -> Switch to Command Line (or you hit F7), you can highlight the text in question and type the command "cleanindentation" in the command box.
- 175
Select the text you want to modify and run it through 'Tools > Filter Text'. Use command 'expand -t4' (or whatever indentation you want).
- 11
Use key combination CTRL+R to open the replacement dialog window. Now use mouse and mark one tabulator, press CTRL+C and paste it under "Find" section. Under section "Replace" just input four spaces and click "Replace all".
- 140
- 1
- 12
In version 15.12.3, Try to do Ctrl + A to select all text and then select Tools -> Align.
Ctrl+A -> ↹ Tab -> Shift+↹ Tab
Assumes you've changed your Settings -> Editing Options to Indent using Spaces.
- 3,679