Vim: Difference between revisions

Jump to navigation Jump to search
257 bytes added ,  2 April 2023
m
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 the following line to your {{Path|~/.octaverc}} file:
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:


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


and one of the following:
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.


  EDITOR ("<terminal> -e 'vim'");
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


  EDITOR ("gvim")
  edit mode async


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.
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:
1,072

edits

Navigation menu