Mayank Jindal
Mayank Jindal

Reputation: 375

How to put same character in multiple lines in android studio

I have a file named "CMakeLists.txt" in android studio. For example I have three lines in that -

line a
line b
line c

I want to put $ in beginning of all lines like -

$line a  
$line b  
$line c  

Is there any keyboard shortcut or any other method so that I can make it without going to each line manually?

Upvotes: 0

Views: 833

Answers (2)

hadi.mansouri
hadi.mansouri

Reputation: 828

Use 'column selection mode' by hit Alt+Shift+Insert (or from menu Edit->Column Selection Mode) then select first column of all lines and insert '$' character.

Another way is to replace all words 'line' whit '$line' if word 'line' is used only in the start of all lines of your text file.

Upvotes: 1

Sagar V.S.
Sagar V.S.

Reputation: 246

You can do this by selecting "line" keyword and press ctrl+F and replace it with "$line" or you can simply select all keyword and type "$line" it will replace all keyword as you want.

Upvotes: 0

Related Questions