How do you use replace in Spyder?

后端 未结 5 1871
终归单人心
终归单人心 2021-02-05 00:59

Well, you start with cursor on your text, Ctrl+H and type replacement. But surprisingly i was not able to found any shorcut for actual replace or replace a

5条回答
  •  不知归路
    2021-02-05 01:56

    Why just not use Notepad++?

    In spyder editor, select the entire code (Ctrl+A), copy it (Ctrl+C) and paste it (Ctrl+V) into Notepad++. Then hit Ctrl+F, click on the "Replace" tab/menu (or you can use Tab to navigate) on the window that opens, write the string/value you want to find/replace, write the string/value you want to replace with, hit replace (or replace all: Alt+A; it will replace in the entire code). Do it as many times as you want/need - depending on how many unique values/strings you want to replace in the code. At any stage you can do Ctrl+Z to undo some actions or move the code from spyder editor to Notepad++ again (if you need to). Finally, select all, copy and paste it in the spyder editor and you're done.

    It would be nice if spyder had this functionality implemented since it'd speed up the process but until then you can use this workaround. That's what i do also.

    Video on how to do it (not mine): https://www.youtube.com/watch?v=I6-7GBY0ZHY

提交回复
热议问题