Working with spaces as if they were tabs
Posted: Fri Jan 14, 2005 10:46 pm
Tabs vs. Spaces is always a hot issue. I wish it were possible to work with existing spaces as if they were tabs.
So if I open a file that used spaces for all indenting, I could still use them as if they were tabs (using the specified number of spaces in the preferences). So if the following text were there:
Then the spaces before "do this" would be spaces in the file, but a tab on my screen. It would behave as one character (moving with cursor, deleting, etc), and when it saves it would be 4 spaces again.
As a nifty bonus, if you start on the beginning of the line and press the space bar 4 times, it could (or not, depending on what people want) become a tab automatically.
It would complement the existing preferences... right now it's:
Convert new tabs to spaces
Convert existing tabs to spaces when saving
Just add the following:
Convert leading spaces to tabs when loading
Convert leading spaces to tabs while typing
Then everyone's happy. Any thoughts? Any possibility of this going in? It seems like a perfect compromise, but if you have other ideas I'd love to hear them.
So if I open a file that used spaces for all indenting, I could still use them as if they were tabs (using the specified number of spaces in the preferences). So if the following text were there:
Code: Select all
if something then
do this
end if
As a nifty bonus, if you start on the beginning of the line and press the space bar 4 times, it could (or not, depending on what people want) become a tab automatically.
It would complement the existing preferences... right now it's:
Convert new tabs to spaces
Convert existing tabs to spaces when saving
Just add the following:
Convert leading spaces to tabs when loading
Convert leading spaces to tabs while typing
Then everyone's happy. Any thoughts? Any possibility of this going in? It seems like a perfect compromise, but if you have other ideas I'd love to hear them.