how to auto quote a list of comma separated strings to save typing

This is more of an IDE question. It would be very useful if we get a feature in Rstudio IDE (I think its not there yet) where, when I type a list of comma separated variables, and when I highlight them all and click on this IDE feature button it will auto enclose all the comma separated variables with double (or single quotes).





This should save a lot of typing for people who have to initialise a string vector.

Note: I found several similarly worded questions on rstudo community like the one below but that is not what I am asking. The below link is a completely different question and is not an IDE question.

There is already an add in that is pretty close to that. part of datapasta package.
if you have an unquoted comma seperated list on your clipboard, calling the addin through the IDE will paste, a qouted vector version to the console (which you can copy and paste into your source code).
in the datapasta add in menu, look for 'paste as vector'
and have something like
a,b,c in your clipboard when you press it.

1 Like

Brilliant. I have mapped paste as vector as ctrl-V

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.