Author Topic: WRT set-bookmark  (Read 1036 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
WRT set-bookmark
« 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?)

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: WRT set-bookmark
« Reply #1 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());
}

Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: WRT set-bookmark
« Reply #2 on: June 17, 2021, 03:24:16 PM »
Take a look at alt_bookmark(), and it's lil buddy alt_gtbookmark (goto bookmark).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: WRT set-bookmark
« Reply #3 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.
« Last Edit: June 17, 2021, 03:26:49 PM by Dan »