I use the vertical split command a lot :vsplit
, and I also have click on ctrl] to look at the definition of a variable (after generating the Ctags).
I would like to do a keyboard shortcut that does both like so: I see a variable I would like to see the definition of, so I put the cursor ontop of that variable, perform the keyboard shortcut, and then a vertical split on the right side should show with the definition of that variable (even if it's defined in the same file).. then I perform another keyboard shortcut to dismiss that new window and return to exactly where I was
How do I do that?
CTRL-W CTRL-]
already to open the definition in a split. However, this opens a horizontal split, so it is not exactly what you want.CTRL-W
really mean? where can i find a documentation for it? I see it used everywhereCTRL-W
means, you can try:h CTRL-W
;) It is the first part of the Window commands which allow to split, move, change the size (etc) of the windows.