| View previous topic :: View next topic |
| Author |
Message |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Sat May 15, 2004 11:21 pm Post subject: Bookmark eBooks / scripts / source code etc. |
|
|
I've yet to find an editor that can somehow save bookmarks to files between sessions. you close a file and then re-open it and u've to fish out that particular location in that heap of lines... too bad!
here's a script to help with it...
It works like this... while in the editor u launch this script, it shows a menu with existing bookmarks and an 'add bookmark' option... just click the menu according to need.
bookmarks are made so that they work even if the file contents are changed... they don't remember line number ... rather they remember what's on the bookmarked line! ... this'll help u get back to THAT particular location in your code even after u changed something above it!
when adding a bookmark, the format is:
complete line in file that u want to bookmark**text that'll be shown on menu
( the 2 asterisks delimit the file text & bookmark name )
and if u want to delete a bookmark... press shift while clicking on the menu!
i've made it keeping PSPad in mind but i've made it re-configurable and commented it so that users using other editors can easily adapt it.
Script _________________

Last edited by Rajat on Sat May 14, 2005 10:19 am; edited 6 times in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Sun May 16, 2004 3:44 am Post subject: |
|
|
| Pretty interesting, I've scripted a few bookmarks in one particular text file based on the position of certain heading lines. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Sun May 16, 2004 8:04 am Post subject: |
|
|
if anyone found the script interesting & d/l it then do check that it matches the one in the forum now. as after initial posting i made a couple of changes to take care of spl chars.
though it was before the timestamp of Chris's message. _________________
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Fri Jun 25, 2004 1:37 am Post subject: |
|
|
just a note,
As i was writing a script i used the ToolTip menu from this script and adapted it to my under-devpt script. So it occurred to me to make a note in the forum that the main feature of this ToolTip menu is its single-use-only and doesn't use any hotkey.
so for ToolTip menus of this type this can also be taken as a template. _________________
 |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jul 31, 2004 8:46 am Post subject: |
|
|
| nice script... As for an editor capable of storing bookmarks and all that, you should try Syn Text Editor. It's an open source project and can be found @ http://syn.sourceforge.net.[/url] |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Sun Nov 14, 2004 3:10 pm Post subject: |
|
|
just a note.
I don't know how most of you guys manage your BIG scripts as traversing through it to a certain location takes time... for smaller scripts simply scrolling does it, but for bigger ones i find this script very efficient...
the best places to bookmark are section names... like if the name of a section is 'EditGUI' then i enter the bookmark as:
EditGUI:**EditGUI:
(two times the name separated by two asterisks, though the text after the asterisks can be anything)
now no matter how much code i add/modify above, below or in the section, the bookmark always works.
eg. for SGUI code approaching 2000 lines, i've my most frequently used sections bookmarked.
do give it a try if u've some big codes. _________________
 |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Nov 28, 2004 8:04 am Post subject: Re: Bookmark eBooks / scripts / source code etc. |
|
|
| Rajat wrote: | | I've yet to find an editor that can somehow save bookmarks to files between sessions. you close a file and then re-open it and u've to fish out that particular location in that heap of lines... too bad! |
Emacs can [url=http://www-2.cs.cmu.edu/cgi-bin/info2www?(emacs)Bookmarks]do it[/url] for 10+ years. It even finds the bookmarked location if the file changed in the meantime. Unfortantely, this editor has its own philosophy which only few people bother to learn. |
|
| Back to top |
|
 |
twwilliams
Joined: 24 May 2004 Posts: 23 Location: Bellevue, WA USA
|
Posted: Mon Nov 29, 2004 10:56 pm Post subject: Re: Bookmark eBooks / scripts / source code etc. |
|
|
| Anonymous wrote: | | Emacs can [url=http://www-2.cs.cmu.edu/cgi-bin/info2www?(emacs)Bookmarks]do it[/url] for 10+ years. It even finds the bookmarked location if the file changed in the meantime. Unfortantely, this editor has its own philosophy which only few people bother to learn. |
vim can do this, too, and has again won text editor of the year from Linux Journal. It's available for Windows, too, and does a very nice job there.
But, like emacs, it will require some adjustment for people used to most Windows text editors. _________________ Tommy |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Mon Nov 29, 2004 11:36 pm Post subject: |
|
|
thanx for the info guyz... all this'd been very useful had i got it before i coded this script... but now i'm getting all the features i want in my fav. editor, and ppl don't easily change their editors... _________________
 |
|
| Back to top |
|
 |
jtran21
Joined: 01 Dec 2004 Posts: 10
|
Posted: Sun Dec 05, 2004 8:53 pm Post subject: Script is very helpful |
|
|
Hey Rajat,
I'm using the script (my texteditor is EditPlus, but other than changing the window title name in the script, everything else was flawless!). Just wanted to say thanks...very useful!
--Jim
P.S. One line I did change for my personal taste was the one which pops up the input dialog:
InputBox, InputText, Bookmarks for [%FileName%],Line from file**Bookmark name, , 300, 120
I just made it a bit more compact. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Sun Dec 05, 2004 11:17 pm Post subject: Re: Script is very helpful |
|
|
| jtran21 wrote: | | One line I did change for my personal taste... |
that's the beauty of scripting... customisation and control!  _________________
 |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 207
|
Posted: Thu Dec 09, 2004 9:32 pm Post subject: |
|
|
| Quote: | | vim can do this, too |
Lol, I learn something new about vim! The best part about it and emacs, IMO, is that you can use them forever (or a few months like me) and still learn new stuff about them. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1687
|
Posted: Sat May 14, 2005 10:15 am Post subject: |
|
|
i just updated the script to use ahk menu instead of the now obsolete tooltip menu. also updated to use pspad by default. _________________
 |
|
| Back to top |
|
 |
|