SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: tk on August 22, 2006, 07:40:23 AM

Title: bookmarking across buffers
Post by: tk 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
Title: Re: bookmarking across buffers
Post by: Graeme 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
Title: Re: bookmarking across buffers
Post by: tk 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.
Title: Re: bookmarking across buffers
Post by: Graeme 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
Title: Re: bookmarking across buffers
Post by: tk 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.
Title: Re: bookmarking across buffers
Post by: Graeme 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


Title: Re: bookmarking across buffers
Post by: tk on August 23, 2006, 01:24:44 AM
Perfect! that works. Thanks.  :D
Title: Re: bookmarking across buffers
Post by: Graeme 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
Title: Re: bookmarking across buffers
Post by: Jim McDaniel 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.
Title: Re: bookmarking across buffers
Post by: chrisant 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.
Title: Re: bookmarking across buffers
Post by: Jim McDaniel on July 30, 2009, 05:32:47 PM
It worked.  Thanks.