Answer the question
In order to leave comments, you need to log in
Is there a plugin or hotkey to separately select all text in quotes?
Hello everyone. I don't understand programming from the word at all. And I need help with this. There is code in VS Code with a lot of quoted text. So, how to select all this text? The matter is that it is necessary for me for translation. I found a plugin for translation and conversion, sort of. It remains to understand how to select text and not touch the code itself.
i "\"Are you hiding something from me?\""
g @ 2_reg "\"Depends.\""
i "\"Something dangerous at least?\""
g "\"I don't believe I am hiding such things from you.\""
i "\"...\""
g 2_reg "\"You heard some rumor about me, didn't you?\""
Answer the question
In order to leave comments, you need to log in
So what I would like to suggest.
Let's say there is a file with the specified text.
After analyzing the text, we see a pattern that all the text to be translated starts with "\"
and ends with \""
.
accordingly, we need to select all such pieces in the text.
To do this, the standard features of the editor and regular expressions will help us, and only 5 seconds of time, after you get used to it:
1. Press CTRL+F
- search by text.
2. Switch the search to regular expression mode by clicking ALT+R
(or on the third icon, which is with an asterisk, after the input field)
3. Enter the appropriate regular expression: \\"(.*)\\"
4. Click ALT+Enter
to select all found areas in multi-selection mode.
5. Press the hot key of the google translate plugin for translation ALT+SHIFT+T
6. Since in some places an extra space could be added at the beginning between: \"
-> \ "
, then we just need to fix it.
7. Press CTRL+H
8. Turn off the regular expression search mode (see point 2)
9. In the first field, enter the current state of what we want to replace - \ "
10. In the bottom - what we want to replace - \"
11. Click CTRL+ALT+Enter
(or the lower right icon - replace all).
12. Done. The text has been translated, the extra space has been corrected. No plugins - 5 seconds of time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question