SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jporkkahtc on June 16, 2021, 09:51:20 pm

Title: WRT set-bookmark
Post by: jporkkahtc on June 16, 2021, 09:51:20 pm
What is the difference between
Code: [Select]
set-bookmark -q
set-bookmark -r
?

set-bookmark -r creates a bookmark named "-r"
set-bookmark -m creates a bookmark named "-m"

I was looking for a command I can bind to a key that would simply set, delete, or toggle a bookmark - without worrying about names or anything. Just mark the spot.
This would be a lot like setting breakpoints.
(Maybe I should just use breakpoints?)
Title: Re: WRT set-bookmark
Post by: Graeme on June 16, 2021, 11:40:21 pm
I use this, plus the built-in toggle-bookmark.


_command void my_set_bookmark() name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_READ_ONLY)
{
   set_bookmark(get_bookmark_name());
}
Title: Re: WRT set-bookmark
Post by: Dennis on June 17, 2021, 03:24:16 pm
Take a look at alt_bookmark(), and it's lil buddy alt_gtbookmark (goto bookmark).
Title: Re: WRT set-bookmark
Post by: Dan on June 17, 2021, 03:25:00 pm
There's also alt-bookmark and alt-gtbookmark to set and jump to bookmarks.  You can bind them to ctrl+number keys and alt+number keys (I know they both have alt in the title, but generally you use one of them to set the bookmark, and one to jump to it).

Just in case you guys didn't know.

Edit: Dennis beat me to the punch on this, but I'm leaving my response because it explains a little bit about how it works.