Author Topic: Can I prevent editor to convert spaces to tabs on indent?  (Read 4208 times)

Offline mkaut

  • Multiple posting newcomer
  • *
  • Posts: 10
Can I prevent editor to convert spaces to tabs on indent?
« on: February 03, 2016, 01:46:12 pm »
In all my codes, I use the "indent with tabs, align with spaces" approach, to make the formatting independent on the tab size (see for ex. http://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces).

The problem is that when I (un)indent a block of text, the CB editor converts all leading spaces to tabs, messing up the formatting.
Is there some way to turn this off?

The only think I know of is to turn off the "Tab indents" and "Backspace unindents" options, so that I can use a vertical selection to insert/delete leading tabs .. but it would be nice to make it work with Tab/Shift+Tab, to avoid reaching for the mouse..

(This is in no way connected to the new release, I have been struggling with this for many years, don't really know why I have not asked before...)

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Can I prevent editor to convert spaces to tabs on indent?
« Reply #1 on: February 03, 2016, 04:39:44 pm »
I think this does it

Settings -> Editor -> General Settings ...... uncheck "Use TAB character"

Offline mkaut

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Can I prevent editor to convert spaces to tabs on indent?
« Reply #2 on: February 04, 2016, 09:36:13 am »
I think this does it

Settings -> Editor -> General Settings ...... uncheck "Use TAB character"

Sorry, but that does not help - that will just replace tabs with spaces. As I said in my original post, I am using both: tabs for indent and spaces for alignment...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Can I prevent editor to convert spaces to tabs on indent?
« Reply #3 on: February 04, 2016, 09:55:55 am »
This is not supported at the moment. Patches welcome. :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mkaut

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Can I prevent editor to convert spaces to tabs on indent?
« Reply #4 on: February 04, 2016, 05:11:50 pm »
This is not supported at the moment. Patches welcome. :)

Thanks for info. As for a patch, that is probably beyond my capabilities..