I noticed this plugin does not do anything when the command is invoked inside of quotes inside of a comment.
Is this by design or a limitation?
I am guessing because I did not look at the code, but based on testing it looks like the behavior is based on the editor's notion of string regions. For example, if I have this string in code
'string "quoted" in singlequotes'
and regardless of where I put my cursor inside the string before i run the command, it will maintain the same actual string value while changing the quotes, escaping the inner double-quotes as necessary (!).
This is quite cool as it seems to actually perform a transformation on the code which maintains the semantics of the code itself.
However I do not think that it is quite as potentially productive as performing a more "raw" operation on the characters (which is what I am after -- that is, reducing the amount of typing I do as opposed to being averse to modifying the semantics)
In other words, I'd prefer it if, only if I place my cursor on the part the string above, quoted, inside the double-quotes, that it would actually modify those double-quotes to single-quotes to save me the typing, even if it changes my string. Similarly if it could work on strings inside comments like that.
What are your thoughts?
thanks
I noticed this plugin does not do anything when the command is invoked inside of quotes inside of a comment.
Is this by design or a limitation?
I am guessing because I did not look at the code, but based on testing it looks like the behavior is based on the editor's notion of string regions. For example, if I have this string in code
'string "quoted" in singlequotes'and regardless of where I put my cursor inside the string before i run the command, it will maintain the same actual string value while changing the quotes, escaping the inner double-quotes as necessary (!).
This is quite cool as it seems to actually perform a transformation on the code which maintains the semantics of the code itself.
However I do not think that it is quite as potentially productive as performing a more "raw" operation on the characters (which is what I am after -- that is, reducing the amount of typing I do as opposed to being averse to modifying the semantics)
In other words, I'd prefer it if, only if I place my cursor on the part the string above,
quoted, inside the double-quotes, that it would actually modify those double-quotes to single-quotes to save me the typing, even if it changes my string. Similarly if it could work on strings inside comments like that.What are your thoughts?
thanks