Archived Beta Discussions > SlickEdit 2018 v23 Beta Discussion

B6: Syntax expansion & tabs

(1/3) > >>


I was writing a new C file. My default C style has hard tabs, but for this file I wanted spaces so I turned off tabs for this document. This worked fine for ordinary lines but when I typed "for (" I suddenly ended up with hard tabs again (the indent was spaces until the syntax expansion), see attached screenshot.  I have adaptive formatting on but it claims (rightly) that it has insufficient data to do anything.



It looks like toggling the tab for the document doesn't communicate that setting to the beautifier.  So whenever a syntax expansion consults the beautifier, the profile's tab setting is used.  We'll take a look at it.

Now in RC1 I have a similar and arguably stranger version of the same thing - again a header file with not enough spaces for adaptive formatting to override hard tabs, gain with tabs turned off by document.  I enclose the entire file and a couple of screenshots as I try to add an "if".  Now I understand that this is a bit of an odd file but the behaviour is still strange.

So starting where I've typed if in the 1st image (if0) then I type space (if1) and then down-arrow (if2).  Now all of this may be by design but it isn't what I was hoping for!

P.S. How is insert image meant to work in this comment editor? Poking the button didn't seem to do anything

That just looks like a bug where the syntax expansion doesn't realize it's in preprocessing.  We'll look into that as well.

In this case beautify while typing should be automatically disabled for syntax expansion in preprocessing. That's what's causing the lines before and after to be indented weirdly.

The syntax expansion still seems useful even if it doesn't put \ at the end of each line as long as beautify while typing does mess up all the indenting.


[0] Message Index

[#] Next page

Go to full version