简体   繁体   中英

Intellij Idea: is it possible to store search-replace expressions for future reuse?

I often need to do complex regex-based find-replace operations in Intellij and apparently, the automatic search history only stores the latest dozen or so expression pairs.

Is there a way to permanently store the find/replace pairs for future reuse? It is a bit cumbersome to have to copy-paste the expressions elsewhere.

Sometimes I might spend several minutes writing a one-off complex regex thinking I won't need later, but then when it turns out I do need to replay it a couple of days later, and it is not in the history anymore.

Is there a built-in way to have the expressions stored permanently, eg mark a specific find/replace expression as permanent?

You could use Edit > Find > Replace Structurally and save your Search and Replacement expressions as templates.

在此输入图像描述

More details in the docs .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM