Home Download Buy Blog Forum Support

Disable auto indentation

Disable auto indentation

Postby GreyWyvern on Fri Oct 23, 2009 7:18 pm

I would like to disable auto indentation altogether. Is this possible?

I checked and double checked the sublime preferences text files, and also did some forum searches but nothing came up. Am I overlooking this setting? I'm an old school notepad/metapad user and I just can't get used to all this whitespace being added automatically :)

Thanks in advance!
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: Disable auto indentation

Postby jps on Fri Oct 23, 2009 10:08 pm

It's not possible atm (not sure how I missed that), but I'll change this for the next beta.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Disable auto indentation

Postby GreyWyvern on Fri Oct 23, 2009 10:11 pm

Excellent! :) Thank you very much for your efforts!
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: Disable auto indentation

Postby jps on Thu Oct 29, 2009 1:12 pm

This in in the 20091029 beta, exposed as the option 'autoIndent'
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Disable auto indentation

Postby GreyWyvern on Thu Oct 29, 2009 2:34 pm

Setting this to false does not seem to change any of the indent behaviour for me in the new beta... Maybe some other setting I have is conflicting with it? Here is my user file:

Code: Select all
# Sets the colors used within the text area
colorscheme Packages/Color Scheme - Default/Blackboard.tmTheme

# Font to draw with. To override the system antialiasing settings, append
# :noantialias to the end of the line.
font Lucida Console 10

# The number of spaces a tab is considered equal to
tabSize 2

# Set to false to stop auto pairing quotes, brackets etc
autoMatchEnabled false

# Set to true to insert spaces when tab is pressed
translateTabsToSpaces true

# Set to false for horizontal scrolling
wordWrap false

# Set to 'none' to turn off drawing whitespace, 'selection' to draw only the
# whitespace within the selection, and 'all' to draw all whitespace
drawWhiteSpace none

# Set to false to hide the vertical and horizontal scroll bars
wantVerticalScrollBar false
wantHorizontalScrollBar true

# Set to false to disable automatic indentation
autoIndent false
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: Disable auto indentation

Postby jps on Thu Oct 29, 2009 9:27 pm

When it's off, pressing enter will still copy the leading white space from the previous line, but it won't increase or decrease it in response to '{', '}' etc.

If you were expecting pressing enter to always leave the cursor the first column with to leading whitespace inserted, I've got nothing against adding an option for that too.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Disable auto indentation

Postby GreyWyvern on Fri Oct 30, 2009 4:01 pm

Yes, please. Sorry, I wasn't clear enough in my explanation :)

No automatic whitespace insertion was what I meant originally. Also the "smart home" behaviour, is rolled into that.

Cheers!
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: Disable auto indentation

Postby jps on Sun Nov 08, 2009 11:12 am

Changed in 20091108 so that disabling auto indentation disables all automatic whitespace insertion.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Disable auto indentation

Postby GreyWyvern on Mon Nov 09, 2009 4:45 pm

Success! It works just like I expected it to work! Thanks very much for being so responsive on this; you've definitely sold this customer. I'll be buying a license and switching to Sublime :D

I would still like to be able to disable the "smart home" behaviour, but the autoIndent was the biggie. I'll make a new thread about that in the Feature requests forum and consider this issue closed.

Thanks again! :)
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: Disable auto indentation

Postby GreyWyvern on Fri Dec 04, 2009 5:06 pm

I have been using Sublime with this option disabled for a while and apparently I have missed documenting one little thing.

If I'm working with indented text when the cursor is at the first character in the line, and I press backspace, then [tab width] space characters are removed instead of just one. Personally, since it has to do with automatic behaviours relating to indentation, I think this behaviour should be part of what is disabled with the "autoIndent false" option. My "translateTabsToSpaces" option has been set to "true", if that makes any difference.

However, perhaps there is some way to fix this using the keybindings? Currently there is:

Code: Select all
<binding key="backspace" command="leftDeleteCharacters"/>

But changing that to "leftDeleteCharacter" or "leftDelete" just disabled the backspace key :| Any help?

Thanks!
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Next

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], mwb1100, Yahoo [Bot] and 17 guests