[英]How to change some characters at the same time in Vscode?
i have Vscode and Anaconda.我有 Vscode 和 Anaconda。
There are 50+ ipynb tutorial files that i studied.我研究了 50 多个 ipynb 教程文件。 I work with cells.
我与细胞一起工作。 These files have some Turkih characters that i want to change.
这些文件有一些我想更改的土耳其语字符。 These characters are both in uppercase and lowercase.
这些字符都是大写和小写的。
Ç --> C
Ğ --> G
Ö --> O
Ş --> S
Ü --> U
İ --> I
ç --> c
ğ --> g
ö --> o
ş --> s
ü --> u
ı --> i
In Vscode there are replace function.在 Vscode 中有替换 function。 How can i change all these characters at the same time for a ipynb file or for all ipynb files
如何同时为 ipynb 文件或所有 ipynb 文件更改所有这些字符
Thanks very much.非常感谢。
use the extension Replace Rules使用扩展替换规则
Add the following to your settings:将以下内容添加到您的设置中:
"replacerules.rules": {
"Replace Turkih": {
"find": ["Ç", "Ğ", "Ö", "Ş", "Ü", "İ", "ç", "ğ", "ö", "ş", "ü", "ı"],
"replace": ["C", "G", "O", "S", "U", "I", "c", "g", "o", "s", "u", "i"]
}
}
With extension Command on All Files you can apply a command on a selection of files in the workspace.使用所有文件上的扩展命令,您可以对工作区中的选定文件应用命令。
We need the extension multi-command because the have to add arguments to the command.我们需要扩展多命令,因为必须将 arguments 添加到命令中。
Add the following to your settings:将以下内容添加到您的设置中:
"multiCommand.commands": [
{
"command": "multiCommand.replaceTurkih",
"sequence": [
{ "command": "replacerules.runRule",
"args": { "ruleName": "Replace Turkih" }
}
]
}
],
"commandOnAllFiles.commands": {
"Add Hello to the End": {
"command": "multiCommand.replaceTurkih",
"includeFileExtensions": [".ipynb"]
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.