Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request - highlight on scrollbar #3116

Open
Cysign opened this issue Mar 31, 2017 · 32 comments
Open

feature request - highlight on scrollbar #3116

Cysign opened this issue Mar 31, 2017 · 32 comments
Assignees

Comments

@Cysign
Copy link

Cysign commented Mar 31, 2017

Highlightning searchresults (or marked strings by double-click) on scrollbar would be appreciated.

@Otiel
Copy link

Otiel commented Apr 11, 2017

The "Smart Highlighter" component of jN plugin does kinda this:

screenshot

@Cysign
Copy link
Author

Cysign commented Apr 11, 2017

Beautiful!
That makes the best texteditor even better ;)

Might this be adoptable for the core npp?

@Cysign
Copy link
Author

Cysign commented Apr 11, 2017

Is there a precompiled version of this plugin available?
Couldn't find it in the plugin manager...

@Otiel
Copy link

Otiel commented Apr 11, 2017

  1. Download the latest release of the plugin.
  2. Extract the content of the plugin folder located inside the downloaded archive to C:\Program Files (x86)\Notepad++\plugins
  3. Optionally, disable all components of the jN plugin except for Smart Highlighter: move each *.js file from C:\Program Files (x86)\Notepad++\plugins\jN\includes to C:\Program Files (x86)\Notepad++\plugins\jN\includes\disabled, except the following files:
  • Dialog.js
  • MenuCmds.js
  • SmartHighlighter.js

@mzso
Copy link

mzso commented Jun 6, 2017

I also sorely miss this feature.
It seems like there are two bugs for this though. Either this or #1974 should be set as a duplicate.

@serg3y
Copy link

serg3y commented Feb 22, 2020

The jN plugin adds too much other stuff and the highlight is not working for me.
Smart Highliter - Settings menue is broken and displaying no text.

This should be core feature. Everyone is used to it because of using chrome.
It would make coding and finding the right occurrence so much faster and simpler.

@mzso
Copy link

mzso commented Apr 11, 2021

@Otiel commented on 2017. ápr. 11. 17:34 CEST:

  1. Download the latest release of the plugin.
  2. Extract the content of the plugin folder located inside the downloaded archive to C:\Program Files (x86)\Notepad++\plugins
  3. Optionally, disable all components of the jN plugin except for Smart Highlighter: move each *.js file from C:\Program Files (x86)\Notepad++\plugins\jN\includes to C:\Program Files (x86)\Notepad++\plugins\jN\includes\disabled, except the following files:
  • Dialog.js
  • MenuCmds.js
  • SmartHighlighter.js

Is this still supposed to work? I copied the files, but nothing seems to have changed. jN didn't appear in the plugins menu. No highlights either.

@sasumner
Copy link
Contributor

Is this still supposed to work? I copied the files, but nothing seems to have changed. jN didn't appear in the plugins menu.

Those instructions were probably written before plugin folder structure changed.
Old way: ...\plugins\xxx.DLL
New way: ...\plugins\xxx\xxx.DLL

@mzso
Copy link

mzso commented Apr 11, 2021

@sasumner commented on 2021. ápr. 11. 13:28 CEST:

Is this still supposed to work? I copied the files, but nothing seems to have changed. jN didn't appear in the plugins menu.

Those instructions were probably written before plugin folder structure changed.
Old way: ...\plugins\xxx.DLL
New way: ...\plugins\xxx\xxx.DLL

Well, the package on github is still made with that folder structure. The stuff that are already in the "xxx" subfolder don't change location?

@mzso
Copy link

mzso commented Apr 11, 2021

@sasumner commented on 2021. ápr. 11. 13:28 CEST:

Is this still supposed to work? I copied the files, but nothing seems to have changed. jN didn't appear in the plugins menu.

Those instructions were probably written before plugin folder structure changed.
Old way: ...\plugins\xxx.DLL
New way: ...\plugins\xxx\xxx.DLL

I moved the dll. But no joy. The plugin menu now shows jN, albeit only with an "about" sub-menu item. Markers don't appear on the scrollber when I search or select a word.

@sasumner
Copy link
Contributor

I moved the dll. But no joy. The plugin menu now shows jN, albeit only with an "about" sub-menu item. Markers don't appear on the scrollber when I search or select a word.

As this plugin is not one of the official ones supplied with Notepad++, suggest you take that specific issue up with the plugin author, on the plugin's support site.

@sbormann
Copy link

+1
Please add the highlite-function as a core function to npp!
The jN-Plugin has much too much unused headroom for this feature and i never got it working properly.
Many thanks,
Sebastian

@michaelxzhang
Copy link

Must-to-have feature

@super-sonicX
Copy link

+1 highlight on the scroll bar is needed

@o5h1n0
Copy link

o5h1n0 commented May 12, 2022

+1 scroll bar highlight plsssssssss

@dejavumono
Copy link

This would be truly helpful. Cannot think of any other modern editor who does not support this.

@michaelxzhang
Copy link

michaelxzhang commented Nov 5, 2022

I borrowed jN's idea and code, wrote a plugin, this plug-in still has issues. Anyone interested can improve this plugin.
https://github.com/michaelxzhang/Npp-Highlighter

@serg3y
Copy link

serg3y commented Nov 7, 2022

I borrowed jN's idea and code, wrote a plugin, this plug-in still has issues. Anyone interested can improve this plugin. https://github.com/michaelxzhang/Npp-Highlighter

I get "Cannot load 32-bit plugin error" after following Install instruction. Is there a 64bit plugin to test?
image

@mzso
Copy link

mzso commented Nov 7, 2022

@michaelxzhang
Same here as serg3y.

@michaelxzhang
Copy link

@serg3y @mzso That one is the 32-bit for my own use, I will try to build a 64 one.

@mzso
Copy link

mzso commented Nov 7, 2022

@michaelxzhang commented on Nov 7, 2022, 6:24 PM GMT+1:

@serg3y @mzso That one is the 32-bit for my own use, I will try to build a 64 one.

That'd be nice. I also miss the feature.

@michaelxzhang
Copy link

@serg3y @mzso Please go to my github and try the 32-bit or 64-bit, let me know if it's working or not.

@alankilborn
Copy link
Contributor

@michaelxzhang I tried the 64-bit version of the plugin, built from source with no problems, seems to work reasonably, why not release it and get it linked into Notepad++'s Plugins Admin database?

@michaelxzhang
Copy link

@michaelxzhang I tried the 64-bit version of the plugin, built from source with no problems, seems to work reasonably, why not release it and get it linked into Notepad++'s Plugins Admin database?

Good point, I never thought about it. I will do some test and release it to the database.

@mzso
Copy link

mzso commented Nov 11, 2022

@michaelxzhang commented on Nov 8, 2022, 6:24 AM GMT+1:

@serg3y @mzso Please go to my github and try the 32-bit or 64-bit, let me know if it's working or not.

I thought I responded already, maybe I didn't send it. Anyway the 64 bit build works fine. I get an extra bar with colored squares reflecting the highlights that NPP draws.

@michaelxzhang
Copy link

I thought I responded already, maybe I didn't send it. Anyway the 64 bit build works fine. I get an extra bar with colored squares reflecting the highlights that NPP draws.

No worries. I made some changes to the dll to fix some issues. You may get the latest dll on my github.

@serg3y
Copy link

serg3y commented Nov 13, 2022

It's looking very good!
I am using yesterdays x64 build

Some thoughts:
-I am seeing a lot of red highlights that appear and disappear as i scroll up and down. It's happening on a 16kb text file with lots of notes, but not in a small file. I don't know what the red means. On a small file there is a single red marker at the very end. Something for debugging i am guessing that will be removed?
-Would it be possible to make the highlights clickable? That is clicking would move your scroll to centre on the highlight? Like in VS code. I know the scroll is right next to it, but a single click is better then click, drag, release.
-Integrating the highlights into scroll bar, like in VS code would be even better, but i suspect its too hard at this stage.
-If i create a new file and start inserting lines, the highlighter seems to highlight every single line using the bright green on the left. Dark green highlights on the right are still working. If i save and open the file it fixes itself.
-I understand the difference between bright green and dark green, but it was not obvious straight away and i am not sure if its worth having. Instead I would suggest to make it all a simple grey (like VS code) and if possible let the user right click on the bar and switch mode, enable/disable whole word, enable/disable case sensitive.

Only suggestions of-course,
The tool is already useful to me,
So thank you very much!

@michaelxzhang
Copy link

@serg3y Thanks for the comments.

If the text has special style with red color, it may display it on the panel.
Is it possible you send me the 16kb text file so I will see if I can reproduce the issue? Or even you create a simple text file, then open it, you still see the red marker?
I found a bug in my code, there's a new dll there, you may try it.

I will see if I can make it clickable.

To make the marker on the scrollbar, the notepad++ source code needs to be changed, this beyond my capability. :)

The light green marker on the left means the line has been changed. The marker on the right indicates the smart highlighted text, or text with Style token.

@alankilborn
Copy link
Contributor

The light green marker on the left means the line has been changed

This may be confusing because the Change History feature (in N++ 8.4.6+) uses orange for changes and green for saved-changes. You might consider doing same.

@michaelxzhang
Copy link

The light green marker on the left means the line has been changed

This may be confusing because the Change History feature (in N++ 8.4.6+) uses orange for changes and green for saved-changes. You might consider doing same.

@alankilborn Thank you for the suggestion, I will think about this, may put into next version.

@michaelxzhang
Copy link

-Would it be possible to make the highlights clickable? That is clicking would move your scroll to centre on the highlight? Like in VS code. I know the scroll is right next to it, but a single click is better then click, drag, release.

@serg3y There're some limitations on windows scrollbar so I cannot do click and go to. But I implemented double click highlights will bring you to the location.

@serg3y
Copy link

serg3y commented Nov 19, 2022

Is it possible you send me the 16kb text file so I will see if I can reproduce the issue?

Looks like its DSpellCheck plugin that's making the red highlights...
If I turn off "Spell check document Automatically" the red highlights go away.
I would like to keep spell check on but not have it show in the bar, or have an option to turn bar highlight on/off.

Also the behavior of DSpellCheck bar highlight is strange.

  1. bar highlights depend on where in the document you are.
  2. if i create a new document i get static orange (left) and changing red (right) highlights.

To reproduce
1 install DSpellCheck
2 enable auto highlights
3 start new file (do not save)
4 copy paste 'jiberish\n' x200 times
5 scroll up and down and observe there are static orange and changing red highlights
image
6 save and open file and observe there are only changing red highlights now
image

Is this something that can be fixed in this plugin or required changes to the spell check plugin?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests