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

jporkkahtc

  • Senior Community Member
  • Posts: 2211
  • Hero Points: 192
  • 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: 2561
  • Hero Points: 330
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3290
  • Hero Points: 463
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: 2574
  • Hero Points: 141
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 »