Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5493
- 1. Open the ‘Plugins Admin’ dialogue (Plugins > Plugins Admin...).
- 2. Install LuaScript plug-in.
- 3. Select Plugins > LuaScript > Edit Startup Script.
- 4. Add following lines to the Startup Script, and save the file (File > Save).
- -- Mimic Brackets editor's "Ctrl+]"
- npp.AddShortcut("Increase Indentation", "Ctrl+]", function()
- local pos = editor.CurrentPos
- local lnn = editor:LineFromPosition(pos)
- local ipos = editor.LineIndentPosition[lnn]
- editor.LineIndentation[lnn] = editor.LineIndentation[lnn] + editor.TabWidth
- editor.CurrentPos = pos - ipos + editor.LineIndentPosition[lnn]
- end)
- -- Mimic Brackets editor's "Ctrl+["
- npp.AddShortcut("Decrease Indentation", "Ctrl+[", function()
- local pos = editor.CurrentPos
- local lnn = editor:LineFromPosition(pos)
- local lni, tw = editor.LineIndentation[lnn], editor.TabWidth
- if tw <= lni then
- local ipos = editor.LineIndentPosition[lnn]
- editor.LineIndentation[lnn] = lni - tw
- editor.CurrentPos = pos - ipos + editor.LineIndentPosition[lnn]
- end
- end)
- 5. Restart Notepad++ to activate the modified LuaScript Startup Script.
- 6. Verify the new entries in Plugins > LuaScript menu.
- 7. Open the ‘Shortcut mapper’ dialogue (Settings > Shortcut Mapper...).
- 8. Select ‘Scintilla commands’ tab.
- 9. Change or clear the shortcuts for SCI_PARAUP and SCI_PARADOWN.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement