using vim as default editor in octave

View: New views
3 Messages — Rating Filter:   Alert me  

using vim as default editor in octave

by Bobatapl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have been trying to set up vim as the default editor in octave-3.0.1-1.1 in SuSE 10.2, and have tried the following both in my .octaverc and directly from the octave command line:

edit editor "vim %s"

EDITOR  "vim"

EDITOR "vim -T xterm %s"

and all possible combinations of the above. Also the default terminal is indeed 'xterm'.

echo $TERM
xterm

All the possible combinations generate the same error:
octave:1> edit new.m
Vim: Warning: Output is not to a terminal


I solved the problem by using gvim instead of vim, and all possible combinations do work. gvim doesn't use TERM since it opens its own window. When gvim is set as the deafult editor, 'edit gvim' immediately pops up a new window for the file 'new.m' with the octave/GPL header and other stuff in it.

In any case this behavior w.r.t. 'vim' is strange. Is this an octave error, or (more likely) an operator error on my part?

Searching on just the error generates posts independent of octave, that indicate TERM is improperly set, but that is not the case for me. Is TERM not being passed properly to octave?

Bob

Re: using vim as default editor in octave

by Ben Abbott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jun 12, 2008, at 5:19 PM, Bobatapl wrote:

>
> I have been trying to set up vim as the default editor in  
> octave-3.0.1-1.1 in
> SuSE 10.2, and have tried the following both in my .octaverc and  
> directly
> from the octave command line:
>
> edit editor "vim %s"
>
> EDITOR  "vim"
>
> EDITOR "vim -T xterm %s"

Try

        edit editor "xterm -e vim %s"

Ben

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: using vim as default editor in octave

by Bobatapl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Thu, 12 Jun 2008, Ben Abbott wrote:

>
> On Jun 12, 2008, at 5:19 PM, Bobatapl wrote:
>
>>
>> I have been trying to set up vim as the default editor in octave-3.0.1-1.1
>> in
>> SuSE 10.2, and have tried the following both in my .octaverc and directly
>> from the octave command line:
>>
>> edit editor "vim %s"
>>
>> EDITOR  "vim"
>>
>> EDITOR "vim -T xterm %s"
>
> Try
>
> edit editor "xterm -e vim %s"
>
> Ben

That's it. Thanks!

Bob
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave