How to mimic Visual Studio's CTRL-X, CTRL-V functionality in Notepad++?

前端 未结 8 558
孤街浪徒
孤街浪徒 2021-02-02 10:33

I\'m using Notepad++ for some projects and miss Visual Studio\'s Ctrl + X, Ctrl + C functionality that cuts or copies the entire curr

8条回答
  •  一个人的身影
    2021-02-02 10:55

    1. Install NppPython plugin (can be done with Notepad++ Plugin Manager)
    2. Create this python script using the menu Plugins -> Python Script -> New script:

      if editor.getSelectionStart() == editor.getSelectionEnd():
          editor.lineCut()
      else:
          editor.cut()
      
    3. Restart notepad++ (important)

    4. Go to Menu Settings -> Shortcut Mapper -> Plugin commands

    5. Find the script you just created in the list and set CTRL+X shortcut for it

    6. Enjoy!

提交回复
热议问题