WeloSefer
WeloSefer

Reputation: 248

Sublime Text 2 and Backspace(left_delete) issue

I am having issue with backspace key binding which is not deleting words in Sublime Text 2 only. In order to back space, either I have to highlight the character(s) that I want to delete and hit backspace or use ctrl + z to go back. And, ctrl + backspace erases the enter word rather than just one character(s). Also, shift + backspace has no effect eventhough it suppose to do the same thing as backspace.

I enabled sublime_log_commands(True) to display the key binding in real time and the log displays the proper binding taking place however it does not deleting any character(s) at all.

backpace => command: left_delete

shift + backspace => command: left_delete

&

Ctrl + backspace => command: delete_word {"forward": false} ( this one I am fine with)

Then, I installed FindKeyConflicts plug-in to see if there was any conflicts but the out put seems fine, IMO.

[shift+backspace]
left_delete                              Default
  .
  .
  .
[ctrl+shift+backspace]
left_delete                              Default               
run_macro_file                           Default
 .
 .
[ctrl+backspace]
delete_word                              Default 
.
 .
[backspace]
left_delete                              Default               
run_macro_file                            Default           
         [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":            
        "regex_contains", "operand": "^\"", "match_all": true, "key": "following_text"}, {"operator": 
        "regex_contains", "operand": "\"$", "match_all": true, "key": "preceding_text"}, {"operator": 
         "equal", "operand": true, "match_all": true, "key": "selection_empty"}]
run_macro_file                           Default            
          [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator": 
         "regex_contains", "operand": "^'", "match_all": true, "key": "following_text"}, {"operator": 
          "regex_contains", "operand": "'$", "match_all": true, "key": "preceding_text"}, {"operator": 
         "equal", "operand": true, "match_all": true, "key": "selection_empty"}]
 run_macro_file                           Default              
          [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator":  
          "regex_contains", "operand": "^\\)", "match_all": true, "key": "following_text"}, 
         {"operator": "regex_contains", "operand": "\\($", "match_all": true, "key": "preceding_text"}, 
          {"operator": "equal", "operand": true, "match_all": true, "key": "selection_empty"}]
 run_macro_file                           Default               
         [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator": 
         "regex_contains", "operand": "^\\]", "match_all": true, "key": "following_text"}, {"operator":  
         "regex_contains", "operand": "\\[$", "match_all": true, "key": "preceding_text"}, {"operator": 
           "equal", "operand": true, "match_all": true, "key": "selection_empty"}]
 run_macro_file                           Default              
          [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator": 
          "regex_contains", "operand": "^\\}", "match_all": true, "key": "following_text"}, 
           {"operator": "regex_contains", "operand": "\\{$", "match_all": true, "key": 
           "preceding_text"}, {"operator": "equal", "operand": true, "match_all": true, "key": 
           "selection_empty"}]
run_macro_file                           CSS                  
          [{"operator": "equal", "operand": true, "key": "setting.auto_match_enabled"}, {"operator": 
          "regex_contains", "operand": "^;", "match_all": true, "key": "following_text"}, {"operator": 
          "regex_contains", "operand": ":$", "match_all": true, "key": "preceding_text"}, {"operator": 
           "equal", "operand": true, "match_all": true, "key": "selection_empty"}, {"operator":  
          "equal", "operand": "source.css - meta.selector.css", "match_all": true, "key": "selector"}]

If anyone has any suggestion or work around on how to restore normal backspace operation, I would love to hear it.

Upvotes: 4

Views: 8427

Answers (7)

Priyanshu Jain
Priyanshu Jain

Reputation: 19

I, too, faced the same problem today, and after searching through the documentation, I found the reason and solution to the problem.

This problem occurs because you may have accidentally changed some settings. So you have to revert those settings.

Now, go to Preferences -> settings -> user settings now check for "ignored_packages": ["Vintage"] and remove it from user settings. That's all nows your key shortcuts will work fine.

Upvotes: 0

FoXaWy
FoXaWy

Reputation: 177

easily go to Preferences -> Key Binding - Default search for keys aliases and edit whatever u want save it then its good to go

Upvotes: 0

Lucaci Andrei
Lucaci Andrei

Reputation: 407

I have this problem on my Kubuntu installation. It's fairy simple: When you try to crack your sublime, by changing the hex values of 33 42 to 32 42 it will block the simple backspace (left_delete) and del (right_backspace) after 255 characters. (just try it: write 256 characters, and try to delete the last).

Workaround to this problem is to select the desired characters to be deleted, and than do a left_delete/right_delete.

If you want to solve this problem, do as other suggested, that is, to reinstall your sublime (with an unregistered version).

This problem is not found on Windows.

Upvotes: 0

Ledivin
Ledivin

Reputation: 637

This just happened to me (in SublimeText3), and it turns out I still had the "This is a free copy" alert open in the background. Closing it fixed the issue.

Upvotes: 0

SujitS
SujitS

Reputation: 11423

You should 'reset' sublime text 2's settings. First close sublime text 2 and then open a terminal and type this:

mv ~/.config/sublime-text-2/ ~/.config/sublime-text-2.org

and then restart sublime text 2. :)

Upvotes: 2

compilex
compilex

Reputation: 51

I have same problem, look, I searched how to solve this problem, it's this way:

  1. re-install sublime text

  2. with a hex editor software, I use Ghex for Fedora/Ubuntu, run it and menu File->Open, open the sublime text executable (installation folder), then, go to menu: edit->go to byte, and search by 0x590ADC, replace 33 with 32, save it and then execute and paste the license, this is all, backspace key should work. ‎ Tested with Sublime Text 2.0.2 (linux version)

Upvotes: 2

d_rail
d_rail

Reputation: 4119

Since you said it fixed the issue, I will add it as an answer:

Close all instances, go to your Sublime Text 2 folder and rename to Sublime Text 2 - Backup (for linux, sublime-text-2.backup). So that you don't lose any important stuff. Reopen sublime. This will re-add the aforementioned folder with the default bindings and no extra plugins.

To see what is causing the issue: start adding back the plugins you were using, one by one, and see which breaks backspace. It could also be an issue with conflicting key bindings. So add personal bindings in the same manner as plugins.

Upvotes: 2

Related Questions