Is it possible to configure the status bar panels
-
I like to keep my editor windows to about 80-100 columns wide, which has been fine up to now. However, I downloaded a plugin which displays information in the status bar at the extreme left (just before the length and line count).
you just need to uninstall this
[unknown name]
plugin and your notepad++ will have no problem any more, to display everything at 80-100 columns, as you were used to before ;-)you could also use an extra, independent, second notepad++ configuration, using a portable notepad++ on your desktop from here where you can install this
[put plugin name here]
plugin if you need it from time to time, or if you “can’t live” without it since you’ve installed it. -
sigh that is not my problem at all. The plugin is fine, I just cannot see the messages it is producing because the space given for the messages it produces is absolutely 0 when the window is less than about 80 columns.
-
@Eko-palypse said:
Maybe you wanna provide more details what exactly should be achieved.
The field values can be retrieved by various other calls to either notepad++ or scintilla object.There is a plugin which writes some text to the status bar. Given the chances of my modifying that plugin are low to zero, I was wondering if i could right something to read what was meant to be displayed there and redisplay it across several bits, but that doenst seem to be possible
-
[put plugin name here]
was ment literarily.please provide us with the exact name of the plugin, more details about it, and a screenshot of it if possible.
this way other users that use and know the same plugin can respond if they have a solution or a workaround.if you instead ask for help about “some” plugin that displays “some” text, you will most likely get equally verbalized answers like:
"some" times there is "some" possibility to solve your problem if you do "some" stuff
😉 -
Seconding Meta Chuh’s input. All that plus how about adding 2 screenshots, one with N++ superwide showing a nice display of what you like the plugin showing on the status bar, and then one with it with N++ at your desired (narrower) working width.
HELP US HELP YOU
-
The plugin is this one: https://sourceforge.net/projects/notepad-linter/
Here is a screenshot of my normal statusbar - with no space left on it for anything at all: https://gyazo.com/cd5b12876069d6694296b5431714f98e
and this is what I get if I widen it up a lot: https://gyazo.com/8af0517a4f49c061f724d82815cf2b41
The little blue line you can see at the right of the 1st one or about 2/3 across the 2nd one is the 80 column mark.
Notice also the large amount of unused space on the status bar.
-
For future reference, you can embed It would have been nice if you’d embedded the images, so that we wouldn’t have to go clicking on random links to see your image. Syntax =
![](https://i.gyazo.com/cd5b12876069d6694296b5431714f98e.png) ![](https://i.gyazo.com/8af0517a4f49c061f724d82815cf2b41.png)
Shows =
(more formatting hints in the links in the FYI at the end)
-----
Back to your actual question:
So you want to be able to read what’s in the section on the left of the status bar where you would normally see the file type (aka programming language name), even when the screen isn’t wide enough? Which in your example was “- Missing JSDoc @ returns declarion. (jsdoc/require-returns)”?
That’s a good question. I don’t have a full answer yet: so far, I haven’t been able to.
Details:
I know that in PythonScript, you can use the
notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, '...text...')
to change the value of that section of the status bar. But as of PythonScript 1.3.0.0, there isn’t an equivalentnotepad.getStatusBar(STATUSBARSECTION.DOCTYPE)
(I know, because I was just looking for such a thing a few days ago). You can read what’s normally there (the language description) usingnotepad.getLanguageDesc(notepad.getCurrentLang())
.The other scripting plugins (see links below) probably have similar interfaces. But maybe one of them has an equivalent
.getStatusBar(SECTION)
notation. If so, you could use that to extract the value, and pop it to a msgbox or similar, depending on theHmm, maybe it’s available as one of the Notepad++ messages… I’ll go do some more searching, and post a follow-on, if I can find something more.
- Scripting Plugins
- PythonScript
- PythonScript HOME
- PythonScript DOWNLOAD
- HELP =
Plugins > Python Script > Context-Help
- Getting Started with Python
- LuaScript
- jN: JavaScript for Notepad++
- NppExec
- PythonScript
-----
FYI:This forum is formatted using Markdown, with a help link buried on the little grey
?
in the COMPOSE window/pane when writing your post. For more about how to use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end. It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes (""
) to curly “smart” quotes (“”
), will change hyphens to dashes, will sometimes hide asterisks (or if your text isc:\folder\*.txt
, it will show up asc:\folder*.txt
, missing the backslash). If you want to clearly communicate your text data to us, you need to properly format it. - Scripting Plugins
-
I searched through the current available messages, and some of the NPP code, and couldn’t find any indication that you can
get
that text, rather than just setting it. So now I’m less confident that one of the other scripting plugins has access when PythonScript does not. ☹You might consider putting in a request at notepad-linter for the option of directing their messages to a msgbox instead of to the statusbar , as an alternative for such situations when the status bar is not sufficient.
-
There is one possible way to get the info (that needs to be verified but will work I guess).
However you’ll need a way to use the Win32 API for this.Having the Npp handle you can use this Win32 API
::EnumChildWindows(nppData._nppHandle, enumWindowsCB, 0);
and in the
enumWindowsCB(HWND hwnd, LPARAM)
callback function use::GetClassName(hwnd, winClassName, _countof(winClassName));
to get the Npp child’s window class type.
When the
winClassName
is equal toSTATUSCLASSNAME
you will have the status bar window handlehwnd
.Then you can directly send
SB_GETPARTS
,SB_GETTEXTLENGTH
andSB_GETTEXT
messages to the handle to retrieve the info you need.
The status bar part you’ll need to read in your case isSTATUSBAR_DOC_TYPE
. -
See here for more details when using PythonScript
-
Well, after much fiddling around, I have a python script that detects whehter or not the status bar panel 0 starts with the magic sting, and if so collapses all the other items on the status bar, going to the win32APIs to do it. I’m not entirely convinced about the way I find the window handle, but it seems to work nicely.
-
Well, it won’t let me edit or delete my previous post, so here’s another attempt.
Well, after much fiddling around, I have a python script that detects whether or not the status bar panel 0 starts with the string with which the linter plugin prefixes all messages, and if so collapses all the other items on the status bar, which means I don’t lose the text in them.
I’m not entirely convinced about the way I find the current window handle in the first place, but it seems to work nicely.