Wednesday, September 28, 2016

Re: vim & ctags: how to jump to the definition in new window

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJX637IAAoJENZCakLuo2TNtpUP/3mcZE+ma804MSZEw9CcE4v8
Ebh5L4geZkRPWoOZEyhBSecoK/NoOXnjR1oCrh28Y4myWBwBPp14OSBEvJwLBTHe
tNw4esM4ule5jHORlE3Tag1UhPrGmDjQFNAgZ2JQxZ0qKERbeioITUV+PtAJBNJd
0hVK4wV2RKOsphVVJUYfWZbFZ5I7T3vdZCrW9Vz1d5iTmFi7Rqwlu5TDQhocVLQp
bBbFd/pw96+K53xxqgHbslNjbCE3v2Flc6pjGZoWceyNVKR5KckQ166D9GMWsRSo
lgp+1SWKV+ueNI2WCJrOmK1CBY2y40R87QxLtJsRD9+BiQBJLnz7clq4f6GT4WeX
5qOz/osKAUA1tQSxhdeb4V7XmjgbyaQpI8zY0ETkVq0w+X1kDULHb5ZmFcQDPu66
uXWEBQKBjrvaQ2KGc6btIh5ItZuaBRR7H7xKEazBfwLzPqJw58++9qIOqBg5TvRF
U1PKalbYVx9reFQOBYoss5JRLSHBq8ShVuXgxW9R7+8MA5PdNttSxOTLUmu5DNf5
93kFQ9SagUAZE/f91MgTp2NY3nqS3tAu12qj8Mm5nVMuA9yfBUMCitIPNS+Dliij
AJJhDJC7tj1JwC81M9Z4G3lOdErCtBuZ5erFI61JOOsJG1m4Z8jok+PuBBmD69+j
BnsF+HCQryUTnsq4GoSM
=sigN
-----END PGP SIGNATURE-----
On 9/22/16 2:28 PM, 张正宇 wrote:
> Hi Bryan & Marc
>
> On 9/21/16 9:30 PM, Bryan Richter wrote:
>> On Wed, Sep 21, 2016 at 10:49:48AM +0800, 张正宇 wrote:
>>> Hello list!
>>>
>>> I am reading some source code with vim & ctags these days. You know
>>> sometimes people just forget those input/output parameters while
>>> diving into functions ...
>>>
>>> So, is there some good way to open a new window to view the
>>> definition after I press 'G+] ' while keep the previous file shown?
>>
>> The split version of 'g ]' is 'CTRL-W g ]'. The commands versions of
>> those keybindings are :tselect and :stselect.
>>
>>> All I want is a 'Cover Flow' style. For example, after I press 'G+]'
>>> in file A, a new window split up from A's to show file B. When I
>>> press 'G+]' again in file B, file A is hidden and replaced by B,
>>> while a new file C will show up in B's former window.
>>
>> Here's a sample workflow. It could be made easier with some custom
>> commands...
>>
>> " Begin with a fresh tab page while in file A
>>
>> :tab split
>>
>> " Split and view a definition.
>>
>> CTRL-W g ]
>>
>> " Now A and B are visible. From file B, jump further forward.
>>
>> :only
>> CTRL-W g ]
>>
>> " Further... (C and D become visible)
>>
>> :only
>> CTRL-W g ]
>>
>> " Now backwards! (B and C are visible again)
>>
>> :only
>> :below split
>> :pop
>>
>> " ...
>> "
>> " Leave the 'Cover Flow' view
>>
>> :tabclose
>>
>
>
> Thanks for your reply. `Ctrl-W g ]` seems to be a good start. I will do
> some homework on vim and try to figure out my own 'cover flow' solution
> (maybe learn to write a shabby plugin script? :P)
>
>
> Thanks!
> zzy
>

As I said, I struggled to write a plugin. Request for comment!

https://github.com/freemandealer/CodeCoverFlow

Thanks
zzy

--
--
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:

Post a Comment