Author Topic: bookmarking across buffers  (Read 5668 times)

tk

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
bookmarking across buffers
« on: August 22, 2006, 07:40:23 am »
How do i get bookmarks to work across buffers? Currently when i set bookmarks (set-bookmark) in multiple buffers and then try next-bookmark, it only cycles through the bookmarks in the current buffer.

The push-bookmark (or any other push-*) works fine across several buffer. I just see this behavior with set-bookmark.

Thanks,
-TK

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: bookmarking across buffers
« Reply #1 on: August 22, 2006, 09:41:37 am »
How do i get bookmarks to work across buffers? Currently when i set bookmarks (set-bookmark) in multiple buffers and then try next-bookmark, it only cycles through the bookmarks in the current buffer.

The push-bookmark (or any other push-*) works fine across several buffer. I just see this behavior with set-bookmark.

Thanks,
-TK


next-bookmark works across buffers for me.  I have "workspace bookmarks" enabled but that shouldn't make any difference.

Which version of slickedit and which operating system are you using?

Graeme

tk

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: bookmarking across buffers
« Reply #2 on: August 22, 2006, 08:04:17 pm »
SlickEdit Version 11.0.1 on xpsp2

i have tried to change "workspace bookmarks" but with no help.

i'm however working with no workspace nor projects. just several files opened. and no matter what i do, next-bookmark never switches between the opened buffers. yet it does switch if i used push-bookmark and then popped them via ctrl-,
just not with set-bookmark.

this particular issue is starting to really get to me. because i know it is supposed to work, but for some reason it is not working for me.

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: bookmarking across buffers
« Reply #3 on: August 22, 2006, 10:52:27 pm »

If I have no workspace open but just a few files, next-bookmark still works across buffers for me.

If you dock the bookmark toolbar, do you see all your bookmarks listed in the toolbar window?
If you double click one of them does it take you to that line?
If you use the icon on the bookmark toolbar for "create bookmark" does that allow next-bookmark to work.

You could try running slickedit with a brand new config directory  - use the -sc some-directory option on the command line when you invoke slickedit to make slick use some-directory.  It will create default settings and probably ask you to create tag files etc  - but then you'll get a "clean" config directory  -  I don't know if this would make any difference, it's just something to try.

Graeme

tk

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: bookmarking across buffers
« Reply #4 on: August 22, 2006, 11:54:04 pm »
funny! it does work when starting with clean config.

here is what i found. if i set the emulation to "Visual Studio" or "Visual C++ 6" then it doesn't work. setting it to any other emulation pretty much, makes it work!! is this by design?

wouldn't that mean that there is a setting that controls that? i can't seem to find that.

thanks for the tip of starting with clean config.

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: bookmarking across buffers
« Reply #5 on: August 23, 2006, 01:06:54 am »
funny! it does work when starting with clean config.

here is what i found. if i set the emulation to "Visual Studio" or "Visual C++ 6" then it doesn't work. setting it to any other emulation pretty much, makes it work!! is this by design?

wouldn't that mean that there is a setting that controls that? i can't seem to find that.

thanks for the tip of starting with clean config.

Probably def_vcpp_bookmark.
type set-var def_vcpp_bookmark at cmd line to see its value.

You could set it to zero using set-var or change and recompile vcppdef.e (line 590) and vsnetdef.e (line 519).
Alternatively change line 699 of bookmark.e.
Probably defmain in vcppdef and vsnetdef gets called at startup or when you switch emulations so you could probably have your own startup macro that overrides the setting of def_vcpp_bookmark if you wanted.

Graeme



tk

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: bookmarking across buffers
« Reply #6 on: August 23, 2006, 01:24:44 am »
Perfect! that works. Thanks.  :D

Graeme

  • Senior Community Member
  • Posts: 2274
  • Hero Points: 294
Re: bookmarking across buffers
« Reply #7 on: August 23, 2006, 01:55:38 am »

Actually, maybe even better than my last suggestions is to have your own macro

Code: [Select]
_command my_next_bookmark()
{
    typeless savexx = def_vcpp_bookmark;
    def_vcpp_bookmark = 0;
    next_bookmark();
    // def_vcpp_bookmark = savexx;
}

and bind a key to it.  If you leave the third line commented then as soon as you've used this macro once, the original next_bookmark also works, so the default toolbar icon and menu options would work as you want.  This saves having to modify and rebuild slick files (if that's what you did) whenever a new version of slick comes out.

Graeme

Jim McDaniel

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: bookmarking across buffers
« Reply #8 on: July 29, 2009, 08:12:00 pm »
I use CUA emulation.

When I use next_bookmark it will go to the next buffer if I'm at the last bookmark in the buffer.

I want it locked to that buffer only.

What is the simplest way to change that behavior?

Thanks in advance.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: bookmarking across buffers
« Reply #9 on: July 29, 2009, 08:38:26 pm »
Look for "def_vcpp_bookmark".

Code: [Select]
/**
 * Set to true if you want next_bookmark and prev_bookmark to ONLY navigate
 * bookmarks in the current buffer/file.
 */
boolean def_vcpp_bookmark;

So at the SlickEdit command line (in CUA press Escape) type set-var def_vcpp_bookmark, press Enter, then type 1 and press Enter.  The next/prev bookmark commands should stay within the current file.

Jim McDaniel

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: bookmarking across buffers
« Reply #10 on: July 30, 2009, 05:32:47 pm »
It worked.  Thanks.