Home Download Buy Blog Forum Support

Small bugs

Re: Multiple Characters deleted on backspace.

Postby SteveCooperOrg on Tue Jun 16, 2009 12:45 pm

jps wrote:I can understand that this hurts in some situations, such as when trying to line things up vertically, but I believe it's a win overall.


I see the rationale for it, but I'd really appreciate an option to disable it. For me, down in the level of my fingers, 'backspace' means remove exactly one character. It means 'back a space.' That's built-in on a nervous level.

What I'd rather see in python mode (or really anything with blocks) is preceding whitespace designated as 'words' for the delete word command (ctrl+back). So that lines are interpreted like this;

def myfunc(p):
<ws-1>for x in range(1,3):
<ws-1><ws-2>if p > 4:
<ws-1><ws-2><ws-3>print "hello, world!"
<ws-1>return p

So that if my cursor is just before the print statement, ctrl+back deletes the <ws-3> whitespace token, then <ws-2>, then <ws-1>. I think this is how the python lexer works -- it inserts these whitespace tokens so that the parser understands the indentation involved.

Now that may not be where you want to go, but I'd really like an option for backspace to be delete-one-character, and ctrl+backspace to do the tabbed deletion that is there by default on backspace.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Multiple Characters deleted on backspace.

Postby EJ12N on Tue Jun 16, 2009 3:55 pm

SteveCooperOrg wrote:
jps wrote:I can understand that this hurts in some situations, such as when trying to line things up vertically, but I believe it's a win overall.


I see the rationale for it, but I'd really appreciate an option to disable it. For me, down in the level of my fingers, 'backspace' means remove exactly one character. It means 'back a space.' That's built-in on a nervous level.

What I'd rather see in python mode (or really anything with blocks) is preceding whitespace designated as 'words' for the delete word command (ctrl+back). So that lines are interpreted like this;

def myfunc(p):
<ws-1>for x in range(1,3):
<ws-1><ws-2>if p > 4:
<ws-1><ws-2><ws-3>print "hello, world!"
<ws-1>return p

So that if my cursor is just before the print statement, ctrl+back deletes the <ws-3> whitespace token, then <ws-2>, then <ws-1>. I think this is how the python lexer works -- it inserts these whitespace tokens so that the parser understands the indentation involved.

Now that may not be where you want to go, but I'd really like an option for backspace to be delete-one-character, and ctrl+backspace to do the tabbed deletion that is there by default on backspace.


You can always do a plugin for that :)

I am with you on this one, sometimes leftDeleteCharacters erases too much specially with ctrl+backspace which uses the "delete word left" macro.
Really I think some people like Jon said might find that suitable for them but for me, I rather have:

ctrl+backspace = delete by characters class, if it's whitespace, erase whitespace, if it's words, erase words, etc...
backspace = one character erase
shift+backspace = default sublime behavior which deletes tab (space) indents

of course same applies for delete, just in opposite direction...

the first 2 solutions are all possible with plugins, the other one is there by default... so I am a happy camper :D

See: viewtopic.php?f=5&t=158#p843
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Small bugs

Postby jps on Sat Jun 20, 2009 9:13 am

There's a new command in 20090620, 'leftDeleteCharactersSingle', that will only ever delete a single space character at a time.

The behaviour of Ctrl+Backspace and Ctrl+Delete has also been tweaked.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Small bugs

Postby jaydee on Sat Jun 20, 2009 6:26 pm

I'm not sure if this is a bug or I'm not doing things correctly. But while working with projects, when I create new files in the project, the new files in the directory structure don't become part of the list in CTRL+P. What I do is close the project (just the project, not the files/tabs) and reopen the project, to get the updated list of files.

Am I missing a toggle somewhere or a setting?
jaydee
 
Posts: 8
Joined: Wed Jun 17, 2009 1:10 am

Re: Small bugs

Postby jps on Sat Jun 20, 2009 11:20 pm

You're not missing anything, that's still on the todo list.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Small bugs

Postby jaydee on Mon Jun 22, 2009 1:43 am

@jps

thank you for the info.

@sublimator

thanks for the workaround. works great! :)
jaydee
 
Posts: 8
Joined: Wed Jun 17, 2009 1:10 am

Previous

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 8 guests