News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Can I prevent editor to convert spaces to tabs on indent?

Started by mkaut, February 03, 2016, 01:46:12 PM

Previous topic - Next topic

mkaut

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

cacb

I think this does it

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

mkaut

Quote from: cacb on February 03, 2016, 04:39:44 PM
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...

oBFusCATed

(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!]

mkaut

Quote from: oBFusCATed on February 04, 2016, 09:55:55 AM
This is not supported at the moment. Patches welcome. :)

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