Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Surround text with quotes in Android Studio

Is there a possibilty to easily surround a certain text element in my Android Studio project with quotes?

More specifically without manually typing one quote before and another quote after the text?

For example: some text should become "some text" with minimal effort?

like image 961
c7n Avatar asked Sep 09 '16 07:09

c7n


People also ask

How do you put quotes around text in Java?

All that you need to do is to add “\” in-front of the text and \”” at the end. Example, add double quotes to a String variable in java using escape characters.

How do you put quotation marks on a string by Kotlin?

Kotlin strings are also immutable in nature means we can not change elements and length of the String. To declare a string in Kotlin, we need to use double quotes(” “), single quotes are not allowed to define Strings.


1 Answers

Android Studio (as well as IntelliJ) provides the functionality of certain Smart Keys, which can be found under

Settings > Editor > General > Smart Keys > Surround selection on typing quote or brace

android studio smart keys

If enabled and a certain text is highlighted and a quote is typed the previously highlighted text gets surroundes with quotes (single or double quotes work both, as well as any kind of brackets).

like image 80
c7n Avatar answered Nov 02 '22 20:11

c7n