Editing Vim

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 4: Line 4:


== Vim as the default editor ==
== Vim as the default editor ==
To set Vim as the default editor launched by the GNU Octave {{Codeline|edit}} command, add one of the following line to your {{Path|~/.octaverc}} file:
To set Vim as the default editor launched by the GNU Octave {{Codeline|edit}} command, add the following line to your {{Path|~/.octaverc}} file:


  EDITOR ("gvim")
  edit mode async
 
and one of the following:


  EDITOR ("<terminal> -e 'vim'");
  EDITOR ("<terminal> -e 'vim'");
EDITOR ("gvim")


where {{Codeline|<terminal>}} can be [http://directory.fsf.org/wiki/Gnome-terminal gnome-terminal], [http://directory.fsf.org/wiki/Xterm xterm], or any other terminal of your preference. Please note the {{Codeline|-e}} option is common to the mentioned terminals, change it if necessary.
where {{Codeline|<terminal>}} can be [http://directory.fsf.org/wiki/Gnome-terminal gnome-terminal], [http://directory.fsf.org/wiki/Xterm xterm], or any other terminal of your preference. Please note the {{Codeline|-e}} option is common to the mentioned terminals, change it if necessary.
The {{Codeline|edit}} command defaults to asynchronous communication which creates a new process for the launched editor and then runs it in the background.  If, for some reason, you have modified this setting then you will also need to add
edit mode async
to the {{Path|~/.octaverc}} file.


To use Vim as the default editor without starting a separate window, add the following lines to your {{Path|~/.octaverc}} file:
To use Vim as the default editor without starting a separate window, add the following lines to your {{Path|~/.octaverc}} file:
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: