Changes

Jump to navigation Jump to search

Vim

1,056 bytes added, 23:52, 29 August 2017
added info about terminal emulators for octave info
edit home .
edit editor 'vim > /dev/tty 2>&1 < /dev/tty %s'
 
In version 3.8.0, editor option for edit is gone. In stead use the following:
edit mode sync
edit home .
EDITOR('vim > /dev/tty 2>&1 < /dev/tty %s')
== A better GNU Octave syntax file ==
autocmd FileType matlab setlocal keywordprg=info\ octave\ --vi-keys\ --index-search
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. However, this  Unfortunately info does not work when using gVim, because in dumb terminals. As gVim has only dumb terminal implemented, a workaround must be done to access info. When using vim in Two methods are possible. First one is to use some not dumb plugin, like [https://github.com/carlobaldassi/ConqueTerm ConqueTerm], which turn gVim buffer into terminal emulator.Second method is to select an external terminalemulator, preferably fast loading one, as xterm, and install it. For installing it under Ubuntu, all works fineyou can type:  $ sudo apt-get install xterm Add the following line to your {{Path|~/.vimrc}} file:  autocmd FileType octave setlocal keywordprg=xterm\ -e\ info\ octave\ --vi-keys\ --index-search Now you can type {{Key|K}} in normal mode and a new terminal window will opened and the word under the cursor will be searched for in the GNU Octave documentation index.You can set bigger font and specific window geometry of xterm by following line:  autocmd FileType octave setlocal keywordprg=xterm\ -fa\ 'DejaVu\ Sans\ Mono:style=Book'\ -fs\ 12\ -geometry\ 80x50\ -e\ info\ octave\ --vi-keys\ --index-search
'''OBS:''' If using the Rik's [http://www.vim.org/scripts/script.php?script_id=3600 octave.vim] syntax, replace {{Codeline|matlab}} by {{Codeline|octave}}.
4

edits

Navigation menu