help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using gvim as editor on Windows 7


From: Daryl Lee
Subject: Re: Using gvim as editor on Windows 7
Date: Fri, 24 Jun 2011 08:04:56 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11

Thanks again! This is indeed a voyage of discovery. I know you and the experienced readers will know all this, but for the benefit of other newbies coming along:

The reason "edit .octaverc" came up empty is that that file is in the home directory (~/), which is not in the search path. "edit ~/.octaverc" works just fine, when the full path to gvim is specified. So note to self: learn when search path is used. It seems NOT to be used in "source('.octaverc')", for instance, but IS used in "edit foo.m".

Ironically, my next effort was "edit test.m", which turns out to actually exist in the search path, somewhere inside the Octave folder. That really surprised me (and helped me figure out what was going on).

Thanks for the help.  There's a lot to learn here.

On 6/24/2011 7:11 AM, Ben Abbott wrote:

On Jun 23, 2011, at 5:22 PM, Daryl Lee wrote:

I just bought the newly announced book "GNU Octave Beginner's Guide" and 
discovered I should be able to redefine the default editor.  My preferred editor is gvim, 
and I'm on Windows 7, Octave 3.2.4.  I have not been able to work out the syntax for 
passing a filename to gvim for editing.  Here's what I've done:

edit editor "gvim"
edit .octaverc

With that I get "Create process failed..."

So I spelled out the path:

edit editor "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe"
edit .octaverc

With that I get a nice gvim editor, but no file opened, and this in the console:

warning: edit: some elements in list of return values are undefined
error: matrix cannot be indexed with .

So I add %s to the command:

edit editor "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe %s"
edit .octaverc

And that has no effect (gvim launched, no file, and same warnings).

I'm sure I'm missing something.  I know the authors of the book targeted Linux, 
so I'm wondering if someone has suggestions on how to do this with Windows?

--
Daryl Lee

I haven't tried this on WIndows, but with MacOS my octaverc contains ...

        edit editor "mvim %s"
        edit mode async

Perhaps you just need to add the second line?

Ben




--
Daryl Lee
www.daryllee.com
The unexamined life is not worth living. -- Socrates
The unlived life is not worth examining. -- Unknown



reply via email to

[Prev in Thread] Current Thread [Next in Thread]