9

I got some files have mixed indentation, is there any way I can automatically convert the indentation in Kate?

Giacomo1968
  • 58,727
Wang
  • 956

7 Answers7

6

Select the text you want to modify, then 'Tools > Clean Indentation'.

6

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.

fywe
  • 899
2

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.

1

Select the text you want to modify and run it through 'Tools > Filter Text'. Use command 'expand -t4' (or whatever indentation you want).

Nenad
  • 11
1

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

71GA
  • 140
  • 1
  • 12
0

In version 15.12.3, Try to do Ctrl + A to select all text and then select Tools -> Align.

-1

Ctrl+A -> ↹ Tab -> Shift+↹ Tab

Assumes you've changed your Settings -> Editing Options to Indent using Spaces.

Jawa
  • 3,679