Table of Contents

Notepad++ Editing Techniques

navigation tips

find non ascii

replace tips

Notepad++ customization

syntax highlight

make Npp portable

Notepad++ Plugin list

Plugin name
Hex Editor Hex code file editing
TextFX automate common text typing operation
Compare compare difference and similarity between 2 files in split view
Plugin Manager a plugin online browser and install helper
Python Script add Python consolve integration and python automation for notepad++

Plugin - PythonScript

notepad cmds

editor cmds

Most useful scintilla edit cmd

editor.addText(text) Add text to the document at current position.
editor.clearAll() Delete all text in the document.
editor.selectAll() Select all the text in the document.
editor.gotoLine(line) Set caret to start of a line and ensure it is visible.
editor.getCurLine() = str Retrieve the text of the line containing the caret. Returns the index of the caret on the line.
editor.setTabWidth(tabWidth) Change the visible size of a tab to be a multiple of the width of a space character.
editor.getTabWidth() = int Retrieve the visible size of a tab.
editor.getSelText() = str Retrieve the selected text. Return the length of the text.
editor.lineDelete() Delete current line
editor.lineDown() navi - move cursor to next line

python console cmds

Integrate Your Python Script with Notepad++

Show your scripts in Plugin menu > Python Script > Scripts

add your script to context menu

  1. add your script in default location to menu from Python Script > Configuration panel, or use PythonScriptStartup.cnf mentioned above to register script item in custom directory
  2. then add this to contextMenu.xml (Settings > Edit pop up context menu)
    <Item PluginEntryName="Python Script" PluginCommandItemName="my_script1" />
  3. or put in a sub menu called script with FolderName
    <Item FolderName="Script" PluginEntryName="Python Script" PluginCommandItemName="date" />

add your script to tool bar with icon

  1. add your script in default location to toolbar from Python Script > Configuration panel, or use PythonScriptStartup.cnf mentioned above to add script item in custom directory
  2. set the icon using 16×16 BMP normal image format file

3rd party addon using notepad++ and pythonscript

Qt GUI and PythonScript

My Npp Python Script