I frequently have to edit documents that contain tabs of different sizes (e.g. 4 spaces, 8 spaces) and find it time consuming to have to adjust tab stop sizing each time via the settings dialog (Settings / Preferences / Tab Settings / Tab Size).
I tried to create a macro for this key sequence but NPP (6.5.3) wouldn't let me save it as a valid macro.
Is there any way I can create a keyboard shortcut that will either embed the tab stop size in its definition, or have a shortcut open up the Tab-Sizing dialog so that I can just type in a number to set the tab stop size?
Defining different file types with different tab stop definitions is not a valid solution for my situation.
It won't work with macros, if only because they don't take parameters.
You may have more luck with a script, using Python, JS, PHP or anything else currently available.
instal Python script plugin, create new script, call it say "tab.py", and paste this text into it:
size = notepad.prompt("Input TAB size.", "Set TAB manually.")
editor.setTabWidth(int(re.sub("\D", "", size)))
Assign some shortcut to it, and enjoy.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.