Notepad++: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
:What you would expect (remove line breaks) | :What you would expect (remove line breaks) | ||
;Search and replace with regular | ;Search and replace with regular expressions | ||
: | :Searchbox: <code>^(.*?)A</code>; Find the first 'A' | ||
: | :Replacebox: <code>\1B</code>; Replace the 'A' with 'B' leave all in front if it untouched. | ||
;Where to edit commands in the run-menu | |||
:C:\Users\<username>\AppData\Roaming\Notepad++\shortcuts.xml | |||
;Notepad++ in trouble because you opened a very big file | |||
:Remove it from C:\Users\<username>\AppData\Roaming\Notepad++\session.xml (use another text-editor) | |||
;Implement own scripts with NppExec | |||
NOTE: for below you must have installed pycodestyle <code> pip install pycodestyle</code> | |||
* Install NppExec plugin | |||
* F6 to open script editor and put in: | |||
NPP_SAVE | |||
cd "$(FULL_CURRENT_PATH)" | |||
env_set PYTHONIOENCODING=utf-8 | |||
python -u -m pycodestyle "$(FULL_CURRENT_PATH)" | |||
* Save as PyCodeStyle (or anything you want) | |||
* Clicking OK will execute the script. | |||
Latest revision as of 08:38, 25 January 2023
- Edit-Line Operations-Join Lines
- What you would expect (remove line breaks)
- Search and replace with regular expressions
- Searchbox:
^(.*?)A; Find the first 'A' - Replacebox:
\1B; Replace the 'A' with 'B' leave all in front if it untouched.
- Where to edit commands in the run-menu
- C:\Users\<username>\AppData\Roaming\Notepad++\shortcuts.xml
- Notepad++ in trouble because you opened a very big file
- Remove it from C:\Users\<username>\AppData\Roaming\Notepad++\session.xml (use another text-editor)
- Implement own scripts with NppExec
NOTE: for below you must have installed pycodestyle pip install pycodestyle
- Install NppExec plugin
- F6 to open script editor and put in:
NPP_SAVE cd "$(FULL_CURRENT_PATH)" env_set PYTHONIOENCODING=utf-8 python -u -m pycodestyle "$(FULL_CURRENT_PATH)"
- Save as PyCodeStyle (or anything you want)
- Clicking OK will execute the script.