I'm trying to build an IDE of sorts using the vim-perl interface.
When I do a wincmd inside of perl (VIM::DoCommand()) it seems to lose focus, ie:
:perldo if (scalar(VIM::Windows()) > 1)
{
VIM::DoCommand("wincmd W");
VIM::DoCommand("q");
}
($doc, $num) = (m/>>\s*(\S+)\s*:(\d+)/);
VIM::DoCommand("split $doc);
VIM::DoCommand("$num");
VIM DoCommand("wincmd W");
VIM::DoCommand("+1");
The intent of this is to parse the current line, get a file and line
number (assuming a given format for the file) and then split the
document to the file under the cursor and forward the pointer to the
line number in question (ie: like emacs debugging mode).
This works OK, except that when the wincmd is given and it switches
back to the trace file (incrementing one line) , it loses focus on the
given file. ie: instead of keeping the cursor where it is (on the
current file name), it goes to the beginning of the source file that I
want to see, which is very annoying.
Is there any way to keep the focus where eg. VIM::DoCommand("1000")
puts you, ie: showing the screen centered around the 1000th line?
Ed
Please report any problem you have when you try the following (report = reply to
this mail):
Click the link in the footer of the mail:
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php
Send an email from the address with which you are subscribed to the "To Unsubscribe"
address in the v...@vim.org section of that page.
John