I try to change
rest.get = function(url,onsuccess,onerror) {
rest.askServer("GET", url, null,200,onsuccess,onerror);
};
into
rest.get = function(url, onsuccess, onerror) {
rest.askServer("GET", url, null, 200, onsuccess, onerror);
};
I thought this command would work:
:%s/,(\S)/, \1/g
But it doesn't.
Why ? What command should I use ?
You can use capturing group:
%s/,\(\S\)/, \1/g
\(\S\) is being used to capture the next non-space character after a comma.
OR you can avoid the capturing using positive lookahead:
:%s/,\(\S\)\@=/, /g
Or to avoid the escaping using very magic:
:%s/\v,(\S)\@=/, /g
Use :%s/,\(\S\)/, \1/g.
You should escape parenthesis as noted in vim documentation. Consider this wiki entry: Search and replace in vim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With