Bookmarks list window
-
Coding in Delphi IDE I’m often using bookmarks for code navigation, it’s Ctrl+Shift+1 to Ctrl+Shift+9 to toggle bookmark and Ctrl+1 to Ctrl+9 to go to bookmark number. I know N++ works in a different manner with bookmarks and I can have much more that 9 of them just pressing Ctrl+F2 to toggle on any row. My main problem is navigation: F2 and Shift+F2 is not enough. I would like to have some window with all bookmark lines with numbers and text (at least first 100 chars) when I can double click on a bookmark and be moved there. Something like “Find results” window (Ctrl+F, Find All in Current Document). Possible someone know how to achieve that or some plugin doing that? Thanks in advance!
-
Try Bookmark Manager plugin?
-
@Alan Kilborn
Thank you, but it is not doing what I want. Yes, it allows to use bookmarks similar to Delphi IDE but it still does not list all bookmarks in a single window. Can explain why: I have huge log file with hundred thousands lines and I want to mark some important lines to see only key ones in one list and then be able to navigate to key row to analyze log deeply. Something like that :) -
by using pythonscript plugin and its internal console you could achieve it with a script like this
console.clear() console.show() _filename = notepad.getCurrentFilename() markers = [] bookmarker_id = 1<<24 markerLine = editor1.markerNext(0, bookmarker_id) while markerLine > -1: markers.append(markerLine) markerLine = editor1.markerNext(markerLine+1, bookmarker_id) for line in markers: print ' File "{}", line {} {}'.format(_filename, line, editor.getLine(line).strip()[:100])
but don’t know if it is fast enough on large files as haven’t tested it.
-
Little correction:
print ' File "{}", line {:<10} {}'.format(_filename, line+1, editor.getLine(line).strip()[:100])
-
just tested with a file > 5 million lines
File "... big.txt", line 184 test some text ... File "... big.txt", line 2820230 test some text ... File "... big.txt", line 3355083 test some text ... File "... big.txt", line 4724326 test some text ... File "... big.txt", line 5012185 test some text ... File "... big.txt", line 5444997 test some text ...
took 0.483000040054 seconds
Note, output edited because of spam flagged … :-( -
@Eko-palypse , that’s amazing! Many thanks, it works perfectly!