Find and replace Android studio

2019-03-07 13:27发布

Is there a way to find and replace all occurrences of a word in an entire project( not just a single class using refactor -> rename) and also maintain case, either in android studio or using a command line script?

For example, Supplier has to go to Merchant, supplier -> merchant, SUPPLIER -> MERCHANT. My boss wants me to change all instances of supplier with merchant for a project im working on. Ive been doing it for about an hour and i know im wasting my time. Let me know of any time saving suggestions.

9条回答
We Are One
2楼-- · 2019-03-07 13:38

ctrl + H ..... its give option to replace word from class.

查看更多
干净又极端
3楼-- · 2019-03-07 13:47

On Windows:

Find : Ctrl+F

Find And Replace In Single Class: Ctrl+R

Find And Replace In Whole Project: Ctrl+Shift+R

on OS X ,it is similar, just replace Ctrl with Command

查看更多
闹够了就滚
4楼-- · 2019-03-07 13:48

I think the shortcut that you're looking for is:

Ctrl+Shift+R on Windows and Linux/Ubuntu

Cmd+Shift+R on Mac OS X

ref: source

查看更多
不美不萌又怎样
5楼-- · 2019-03-07 13:50

The shortcuts are

On Windows : Ctrl+Shift+R

On Mac : Cmd+Shift+R

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-03-07 13:52

Try using: Edit -> Find -> Replace in path...

查看更多
叛逆
7楼-- · 2019-03-07 13:55

Use ctrl+R or cmd+R in OSX

查看更多
登录 后发表回答