Hi, All,
So, I tried to follow the right way with script plugins and did some tests with, either, the NppExec, Python Script and LuaScript plugins.
However, I could not get the Line Number margin to toogle from visible to invisible status and vice-versa !
For instance :
On NppExec console ( v0.84 ), the two commands :
npp_sendmsg WM_COMMAND IDM_VIEW_LINENUMBER
npp_sendmsg WM_COMMAND 44012
do not work
On Python console ( v2.0.0.0 - Python 2.7.18 ), the two commands :
notepad.menuCommand(MENUCOMMAND.VIEW_LINENUMBER)
notepad.menuCommand(44012)
do not work, as well
On LuaScript console ( v0.12 - Lua 5.3 ), the two commands :
npp:MenuCommand(IDM_VIEW_LINENUMBER)
npp:MenuCommand(44012)
do not work, also
Apparently, adding the options Constant and Dynamic width, regarding the Line Number margin, in N++ v7.9.2, breaks down this functionality, since that version :-((
I should have realised that before ! If it was impossible to get this fucntionality with a N++ macro, this necessarily meant that NO script plugin could do any better !
To be sure that I correctly used the scripts syntax, I did some tests with two other functions, which worked perfectly :
On NppExec console :
npp_sendmsg WM_COMMAND IDM_VIEW_REDUCETABBAR or npp_sendmsg WM_COMMAND 44005 reduce/enlarge the tabs
npp_sendmsg WM_COMMAND IDM_FILE_NEW or npp_sendmsg WM_COMMAND 41001 open a new file
On Python console :
notepad.menuCommand(MENUCOMMAND.VIEW_REDUCETABBAR) or notepad.menuCommand(44005) reduce/enlarge the tabs
notepad.menuCommand(MENUCOMMAND.FILE_NEW) or notepad.menuCommand(41001) open a new file
On Lua console :
npp:MenuCommand(IDM_VIEW_REDUCETABBAR) or npp:MenuCommand(44005) reduce/enlarge the tabs
npp:MenuCommand(IDM_FILE_NEW) or npp:MenuCommand(41001) open a new file
So, how to be able to show / hide, easily, the Line Number margin ?
May be, I need the @astrosofista’s skills as he could provide us with an AutoHotKey script to achieve this goal ?
Best Regards,
guy038