Home Download Buy Blog Forum Support

Soft tabs, selection wrap and switch syntax

Re: Soft tabs, selection wrap and switch syntax

Postby iamntz on Sun Jul 03, 2011 10:08 am

:cry: still doesn't work how I would like (even if the next word thing it's a interesting feature)
I made another video, with some caption: http://www.youtube.com/watch?v=0_wcPD4nrn4
Maybe I'm lucky now :mrgreen:

Anyhow, why the operand regex doesn't get the \t\b ?
Code: Select all
         {
            "key": "following_text",
            "operator": "regex_contains",
            "operand": "\t\b",
            "match_all":   false
         }


It is the correct behavior or there is a problem in regex parser?
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Soft tabs, selection wrap and switch syntax

Postby jps on Sun Jul 03, 2011 10:27 am

It has nothing to do with the regex, the command you're using is move_to bol, i.e., move to the beginning of line, it's the same command that the home key is bound to on windows.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Soft tabs, selection wrap and switch syntax

Postby iamntz on Sun Jul 03, 2011 10:35 am

Yes, but the move to BOL works ok. WHEN should move (the condition) at the BOL doesn't seems to work well.
Just curious, did I explain well what's the problem? Or we both shoot in the dark and hope that the other one will understand ? :lol:

Thanks.
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Soft tabs, selection wrap and switch syntax

Postby guillermooo on Sun Jul 03, 2011 10:51 am

I don't know what's going in this thread, but iamtz, do you mean "\t\b" or "\t\\b"? In the first case, you're escaping both sequences at the Json level (tab + backspace), not at the regexp engine level (tab + word boundary anchor).
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Soft tabs, selection wrap and switch syntax

Postby iamntz on Sun Jul 03, 2011 11:01 am

@Guillermooo: and... any ideas on what should i have to do? Basically i need to skip all tab chars from the current position to the next non-tab char when i press tab key. I guess i made a definition as well of my problem :D
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Soft tabs, selection wrap and switch syntax

Postby guillermooo on Sun Jul 03, 2011 11:15 am

Doesn't Ctrl+right do more or less what you want? Ctrl+right, Ctrl+left seems to do the trick for me.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Soft tabs, selection wrap and switch syntax

Postby iamntz on Sun Jul 03, 2011 11:35 am

Now i understand what jps said when he referred here!

Works like a charm now!

Code: Select all
   { "keys": ["tab"], "command": "move", "args": {"by": "words", "forward": true}, "context":[
         {
            "key": "following_text",
            "operator": "regex_contains",
            "operand": "\\t",
            "match_all":true
         }
      ]
   }


Thanks a lot guys! Sublime just became more awesome than was 5 mins ago!
iamntz
 
Posts: 915
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 3 guests