Sunday, April 9, 2017

Re: RFE: enable gvim to open a buffer or tab in a new window

Michael Henry wrote:
> - You can create Gvim menus for any of the commands that you've
> seen suggested here, so you can use the mouse instead of the
> keyboard.
>
But can't arrange the separate files in staggered windows as shown
in a previous post.
> - You may want to take another look at tabs. In Gvim, you can
> switch between tabs by clicking on the tab, instead of using
> your desktop window manager to switch between Gvim instances.
>
----
I do that... but generally only have main+header (2 files)/window,
each in a tab.

> - You might also look into the Project plugin
> (http://www.vim.org/scripts/script.php?script_id=69), which
> gives you a menu of files in your project that you can select
> from. This can help you reduce the amount of typing to select
> a file.
>
----
I'm wanting something like that but at a desktop level w/multiple
windows...
> - I use Derek Wyatt's "fswitch" plugin to switch between
> "companion" files (as he puts it):
> https://github.com/derekwyatt/vim-fswitch
>
----
Whenever I edit a source (.c/.cc/.cpp, etc or header (.h)),
my gvim is invoked via a function -- and that automatically opens
the "other" member of a pair in a 2nd tab. So I already use the tab
switching (w/a mouse) to go between tabs to look at base file+header.

> If you have a .cc file open and you want to open the
> corresponding .h file, fswitch can find it and open it for
> you. There are other similar plugins to try as well.
>
> - I greatly enjoy fuzzy file finders. I routinely use CtrlP
> (https://github.com/ctrlpvim/ctrlp.vim.git) and LustyExplorer
> (https://github.com/sjbach/lusty.git) to avoid having to type
> all the characters in a filename. If you are trying to reduce
> the amount of typing, you may want to consider such a plugin.
>
---
In bash, I have file completion, which helps.

> - Similarly, if you aren't already using tags, you may want to
> consider installing Exuberant Ctags and generating a ``tags``
> file for your entire project. I find this feature
> indispensable for navigating through my codebase. When I want
> to find the definition of a function, I just place my cursor
> on the identifier in my current file and press a key; but in
> Gvim, you can use the mouse to follow the tag as well, saving
> keystrokes.
>
----
I've tried that a few times, but never found the tags to be
that useful -- required too much thinking to use and that distracted
me from the task.

Here's another rub -- and why I like the mouse for navigating.
using the keyboard for navigating is too analytical and is more likely
to interfere with the thinking about what I'm doing, which is rather
analytical. Compared to mouse moving, which doesn't seem to use
my analytical-verbal skills so much and feels more unconscious -- in
so much as I don't have to think about it, so it doesn't cause much
"crosstalk" in my analytical thinking.
> Michael Henry
>
Thanks for the pointers & suggestions -- appreciate them, even if
they don't solve my immediate problem, I still tend to file things
away to investigate and maybe use in other ways later...

-linda



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: