Vim: Difference between revisions

575 bytes added ,  11 April 2012
VIM as the default editor
(Accessing GNU Octave info within VIM)
 
(VIM as the default editor)
Line 13: Line 13:


Now, when editing a {{Path|*.m}} file, you can type {{Key|K}} in normal mode and the word under the cursor will be searched for in the GNU Octave documentation index. Pressing {{Key|,}} yields the next occurrence.
Now, when editing a {{Path|*.m}} file, you can type {{Key|K}} in normal mode and the word under the cursor will be searched for in the GNU Octave documentation index. Pressing {{Key|,}} yields the next occurrence.
== 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:
edit mode async
and one of the following:
edit editor "<terminal> -e 'vim %s'"
edit editor "gvim %s"
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.
27

edits