SublimeText / VintageEx

An implementation of Vim's command-line mode for Sublime Text 2
MIT License
381 stars 50 forks source link

Fix escape removal in SubstituteLexer #40

Closed sehe closed 11 years ago

sehe commented 11 years ago

This fixes subsitutions like

:s/\\/\\\\/g
:s/\\t/\\t/g
guillermooo commented 11 years ago

Looks good. Thanks for the PR.

I try to at least write tests for the lexers. Would be great if you could add one for this. I don't know whether all tests would pass now, though :/

I'll try to give this a try soon and then merge it.

guillermooo commented 11 years ago

I think this is still not correct. To replace foo\bar with foo\\bar we should have to enter this command:

s/\\/\\\\/g

However, now this one is required:

s/\\\\/\\\\\\\\/g

sehe commented 11 years ago

Sorry I missed the reply. It looks as if you didn't reload? SublimeText needs to be fully restarted for the change to take effect on my Win7 PC, for what it's worth. Trying it immediately after saving s_cmd.py in place did give me the old behaviour too.

I also edited my first message in this thread to be less confusing (markdown)

Cheers

guillermooo commented 11 years ago

Thanks!