Move buffer to bottom of "stack"

Post general DPack questions or problem reports here.

Moderator: Sergey

Move buffer to bottom of "stack"

Postby catweazle » March 6th, 2008, 4:17 pm

I quite often use Ctrl+Tab to switch between a couple of code files in Visual Studio, and find this very convenient.

However, when I'm done viewing one of these 2 files that are at the "top" of the buffer stack I'd like to be able to move it to the bottom of the stack. (By "top" of the stack I mean that holding Ctrl and pressing Tab just once will display the alternate file, rather than having to hold Ctrl and hit Tab multiple times to "hunt" for the file.)

Emacs has a function called bury-buffer that does exactly this - the doc comment states: "Put buffer at the end of the list of all buffers. There it is the least likely candidate for `other-buffer' to return; thus, the least likely buffer for M-x switch-to-buffer to select by default."

Is there a way to do this in Visual Studio, possibly via a macro?

I'd basically like to be able to press a key and "bury" the current file, such that the previous file is displayed and a subsequent Ctrl+Tab would switch between that file and whatever file was displayed before these top two (i.e., it doesn't bring back the buried file).

Any thoughts/pointers/tips appreciated!

Thanks,

John.
catweazle
Senior Member
 
Posts: 24
Joined: September 15th, 2005, 6:00 am

Postby Sergey » March 6th, 2008, 11:29 pm

Hi John,

AFAIK there is no such command built into VS. There is also no way to use general extensibility to get to that document/window order that I know of.

There is one thing that still drives me nuts about VS 2005/2008 is how new document windows open. VS.NET 2003 used to open them in left-to-right order but that's changed to right-to-left with new VS versions. I know a lot of people complained about it and believe it or not Microsoft’s response was that it was part of usability re-design. :roll: So, they said they'll look into changing that for VS 2008 but nothing happened on that front. Extensibility developers, such as myself, asked if there was a way to get to that document order to alter it via macro or add-in and the answer was basically no.

Take a look at "Window Management Shortcut Keys, Visual C# Scheme" here:
http://msdn2.microsoft.com/en-us/library/ms366743.aspx
That's basically what you can do with windows. See if any of the commands listed there might help you.

HTH.
Sergey @ USysWare
User avatar
Sergey
Moderator
 
Posts: 552
Joined: May 27th, 2005, 3:56 pm
Location: Alexandria, VA


Return to DPack Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron