Closed jasjuang closed 7 years ago
Vintageous uses the Python regular expression engine which, unlike vim, does not use escaped parentheses for capturing. Try instead
:%s/^(.*)$/"\1"/g
I don't believe there are plans to ever make Vintageous RE match exactly that of vim.
Thank you for your response, I tried your proposed command but it does nothing for me, does it work for you?
It does work for me, however I forgot to account for a line anchor bug that has been fixed in master but is still present in the latest official release. It causes improper handling of ^
and $
. For example, if you instead try :%s/(.*)/"\1"/g
, I think you will get the expected result for the example you provided. Not very helpful if you need the anchors, but it demonstrates the difference in how parentheses are used for capturing.
For the moment, if you want the anchor fix, you will need to build Vintageous from source. There are instructions for doing so here.
The solution without the anchor actually works for me... thanks a lot!
Is there any plans on updating the latest change to sublime package?
Suppose I have text below
how are you
after typing
it will return
"how" "are" "you"
in vim but executing this line in vintageous yields no change