Home Download Buy Blog Forum Support

TAB key deletes selected text - sometimes

TAB key deletes selected text - sometimes

Postby costisefu on Wed Sep 04, 2013 2:04 pm

Please help me!

I do not understand why sometimes the selected text gets replaced when pressing TAB key.

I searched google about this problem in Sublime Text and found nothing.
One of my friends sais to me that even his Notepad++ does the same from time to time.
Is it from windows? Am I pressing any key or combination while using the computer?
costisefu
 
Posts: 2
Joined: Wed Sep 04, 2013 1:49 pm

Re: TAB key deletes selected text - sometimes

Postby trevorsg on Wed Sep 04, 2013 8:30 pm

If you have more than one line selected, pressing tab will indent every line that is part of the selection by adding a tab character (or equivalent spaces, depending on your setting). If your selection region spans only one single line, the selected text will be replaced with a tab character. If you want to indent a single line, you will need to insert a tab/spaces at the beginning of the line manually (try pressing the home key).

It does seem like there is a bug where tab will trigger auto-complete if the selection region spans only one line and ends after a character that can be auto-completed, but that doesn't pertain to your question.
trevorsg
 
Posts: 10
Joined: Fri Dec 04, 2009 5:05 am

Re: TAB key deletes selected text - sometimes

Postby costisefu on Thu Sep 05, 2013 6:45 am

Thank you!
It is not that, I am doing everything right.
I select block of code, generally 3-7 lines and soketimes when pressing TAB everything is delected instead of idented.
When it doesn't work I try all kinds of selection and key combinations without success.
I can solve it only by adding manually TABs in front of every line.
And after a while, same day, it works again.

Maybe autocompletion bug, or maybe Windows OS... what could it be? Maybe it has to do with the type of code that I am trying to ident. I will keep you updated.
costisefu
 
Posts: 2
Joined: Wed Sep 04, 2013 1:49 pm

Re: TAB key deletes selected text - sometimes

Postby Kai23 on Thu Sep 26, 2013 1:23 pm

Hello ! Same problem here
To try to be clear, when I start ST, it doesn't happen, but after a while (~15/30min), ST inserts a second tab key after the first one.

So, for exemple, I use a snippet like

Code: Select all
console.log($1)  -- <tabTrigger>log</tabTrigger>


after typing "log", I getsomething like this :

Code: Select all
console.log(   );



here is my config :
Code: Select all
Windows 8.1 x64
Sublime Text 3 Build 3047


Code: Select all
Installed Packages :
"DocBlockr",
"Emmet",
"HTML5",
"jQuery",
"SFTP",
"SideBarEnhancements",
"SublimeCodeIntel",
"sublimelint"


user settings :

Code: Select all
"bold_folder_labels": true,
   "caret_style": "phase",
   "fade_fold_buttons": false,
   "highlight_line": true,
   "highlight_modified_tabs": true,
   "ignored_packages":
   [
      "Vintage"
   ],
   "line_padding_bottom": 1,
   "line_padding_top": 1,
   "preview_on_click": false,
   "save_on_focus_lost": true,
   "trim_trailing_white_space_on_save": true,
   "wide_caret": true


Key Bindings

Code: Select all
{ "keys": ["super+v"], "command": "paste_and_indent" },
   { "keys": ["super+shift+v"], "command": "paste" },
   { "keys": ["super+shift+r"],  "command": "reindent" }


If someone have an idea
Kai23
 
Posts: 2
Joined: Thu Sep 26, 2013 1:14 pm

Re: TAB key deletes selected text - sometimes

Postby Kai23 on Thu Oct 03, 2013 2:33 pm

I up !

It happens only with ST3 and on windows 8 (8.1)
Kai23
 
Posts: 2
Joined: Thu Sep 26, 2013 1:14 pm


Return to General Discussion

Who is online

Users browsing this forum: ChicagoBob, danpyq and 31 guests