3

Tab and Shift+Tab keys are for indenting and unindenting in the "Normal" indentation mode, which is the default. These are fine and do exactly what I want.

Occasionally it is useful to insert a literal tab character into the document, but I can't figure out how to do it without changing the options each time. Pasting a tab naturally transforms it into four spaces as configured.

I'm using Kate 3.14.9.

Gareth
  • 19,080
daxim
  • 1,357

2 Answers2

1

Kate has a function specifically for this!
There just isn’t any shortcut assigned to it by default.

Go to SettingsConfigure Keyboard Shortcuts (Ctrl-Alt-,), then enter insert into the search. You will find a shortcut named Insert Tab. Assign a shortcut to it, and you’re done.

By the way, to avoid having to switch to VI mode via the menus, if you want to enter another literal character, you can use Ctrl-Alt-V, to Switch to next Input Mode.

Finally, Kate as a command line, that allows inserting even more complex things. So if you need it, you can look up how to do that too. :)

0

Not sure if this works (long time since I used Kate).

Activate VI input mode, Ctrl-V, Tab, Exit VI mode.
Ctrl-V in VI takes the next key typed (Tab in this case) and insert it literally without interpretation.

Tonny
  • 33,276