Wednesday, September 21, 2016

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

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

iQIcBAEBCgAGBQJX43n0AAoJENZCakLuo2TNBm4P/17lwfhsFZrKmUx/82Cdw2Qz
Gz+SqyjJ2nPRntsATxRskdfSlcs40o4LPPiwYYp5vWK7Kc7DrdFao9d29Rz/t1Ub
04u5xur1baL2is8YkjtxiTzpBKbhcMdXux3bjwI6cMieBuJUbfgH5xqQBneIsRhp
nK7mUp6RlnOz3EFSIU3O/KRdk/3B7trWv+OecN4XiAQ5UVUqe9LCXZvf8r3mGf9a
OiwahGdzOip9NptqVXl+79inKXXW3BtUvoFQkAyDreAg8CzKv69KPJQH2uyQRueH
KBQIOqY+hg31femV/KxyMzXXILOR5ErFmKmLGGsRJ0TpmHYQoIhjf/vTXm285Zn0
j8OVrSK6eD7SVj0kw6GbwmpDnqP5iyqHPEWa/77vkkHs4vGD3w+H5HVp5muCIW0M
uhYRnPg8hd4S96YHHBVuEn4bIsLfjWJcGawpYcWXsBvq3IevzKK8iFNgzQrn4F/n
cOLHfAqYOMLXORHwzBel9yc6tNsuLtCh4NhXVmCHSHdHp6n+z2iKnINeLEpXB46D
a34zYY6g5MDpqNCMVnWHl6IrMPlGueJY6JrQZcpxUWll0U3v9op2LAvQzw7uw5IA
fep9viHmLZXXUx0pWPVs4UqLRtTmwKfcCAC2wP6UosRO9jderSX+UUytx2Y3EIDx
lQTaBIaBDO/1KLRP6I9f
=RdoN
-----END PGP SIGNATURE-----
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

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