CPAN Gems: Proc::InvokeEditor

hanekomu on 2008-09-12T07:43:30

New blog entry: "CPAN Gems: Proc::InvokeEditor" in my Perl blog.


useful debugging

mr_bean on 2008-09-13T11:34:31

I thought it would be useful for editing variables while in the debugger, but vim is leaving multiple newlines after exiting.

Re:useful debugging

Aristotle on 2008-09-13T11:59:06

Yes, because Vim is a text editor and text files end with a newline. You have to tell it that the thing you’re working on is not a text file by invoking it with the -b switch.

Re:useful debugging

mr_bean on 2008-09-14T05:03:32

vim-7.1 seems to be broken editing binary files.

Even setting noeol, it is adding 4 or 5 NL at the end of the file.

vim-6.4 is doing the right thing, with -b. As you say, without it, there is one NL at the end.

Re:useful debugging

Aristotle on 2008-09-14T06:18:52

Note that eol has to be reset and binary has to be set.

Vim 7 is working correctly here. Are you sure it’s not some global or filetype plugin or something screwing you up? What happens if you pass “-u NONE”?

Re:useful debugging

mr_bean on 2008-09-14T06:42:52

Aha! That's it. It must be my crufty old vim-6 vintage vimrc file.

Because vim -u NONE -b and setting noeol DOESN'T add the last NL with vim-7.

I failed to realize my vimrc had led me astray just a few weeks ago.

I set runtimepath in it. I can remember that was the cause of the problem then. But I can't remember what the problem itself was.