| Server IP : 127.0.1.1 / Your IP : 216.73.216.152 Web Server : Apache/2.4.52 (Ubuntu) System : Linux bahcrestlinepropertiesllc 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/2793023/cwd/usr/share/vim/vim82/ftplugin/ |
Upload File : |
" Vim filetype plugin file
" Language: GNU Octave
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Sep 02
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" TODO: update Matlab ftplugin and source it as the base file?
setlocal comments=s:%{,m:\ ,e:%},s:#{,m:\ ,e:#},:%,:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal keywordprg=info\ octave\ --vi-keys\ --index-search
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<unwind_protect\>:\<unwind_protect_cleanup\>:\<end_unwind_protect\>'
if exists("octave_use_matlab_end")
let b:match_words ..= ',' ..
\ '\<\%(classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\|try\)\>' ..
\ ':' ..
\ '\<\%(elseif\|else\|case\|otherwise\|break\|continue\|catch\)\>' ..
\ ':' ..
\ '\<end\>'
else
let b:match_words ..= ',' ..
\ '\<classdef\>:\<endclassdef\>,' ..
\ '\<enumeration\>:\<endenumeration\>,' ..
\ '\<events\>:\<endevents\>,' ..
\ '\<do\>:\<\%(break\|continue\)\>:\<until\>' ..
\ '\<for\>:\<\%(break\|continue\)\>:\<endfor\>,' ..
\ '\<function\>:\<return\>:\<endfunction\>,' ..
\ '\<if\>:\<\%(elseif\|else\)\>:\<endif\>,' ..
\ '\<methods\>:\<endmethods\>,' ..
\ '\<parfor\>:\<endparfor\>,' ..
\ '\<properties\>:\<endproperties\>,' ..
\ '\<switch\>:\<\%(case\|otherwise\)\>:\<endswitch\>,' ..
\ '\<while\>:\<\%(break\|continue\)\>:\<endwhile\>,' ..
\ '\<try\>:\<catch\>:\<end_try_catch\>'
endif
" only match in statement position
let s:statement_start = escape('\%(\%(^\|;\)\s*\)\@<=', '\')
let b:match_words = substitute(b:match_words, '\\<', s:statement_start, 'g')
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< kp< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet: