Indenters


Kate’s current indenters rely on highlighting information, which is actually elegant. But practice shows that changing syntax highlighting the indenter can be confused pretty fast.

Mainly the disadvantages are:

  • no indentation support if highlighting is disabled
  • C/C++ indentation does not really work for PHP, as PHP uses another highlighting etc.

So the idea is to write an indenter initially for C++, which works highlighting independent. This can either be done by using some clever tricks (your ideas needed!) or by parsing the whole document from the beginning. Parsing would be far too slow every time you insert a character, so something like ”backup nodes” would have to be maintained - you see, it already begins to get quite complex :) Documentation about how to write Indenters can be found on the page Writing Indenters.

Reply

  • You can use Markdown syntax to format and style the text.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.