vim matlab good skeleton and octaverc

This commit is contained in:
Frank Villaro-Dixon 2014-06-24 22:58:55 +02:00
parent 9b9b1d297c
commit 760cb8f6e0
3 changed files with 14 additions and 3 deletions

View file

@ -1,5 +1,6 @@
# Set up a prettier prompt # Set up a prettier prompt
PS1('\w\[\e[m\] \[\e[1;32m\]>>> \[\e[m\]\[\e[0;20m\]') #PS1('\[\e[1;32m\]>>> \[\e[m\]\[\e[0;20m\]')
PS1('\W\[\e[m\] \[\e[1;32m\]>>> \[\e[m\]\[\e[0;20m\]')
function man (name) function man (name)
help (char (name)) help (char (name))

8
vim/skeletons/skel.m Normal file
View file

@ -0,0 +1,8 @@
function [<+OUTPUTS+>] = <+MFNAME+>(<+INPUTS+>)
%<+DESCRIPTION+>
% Inputs:
% <+INPUT1+>
% Outputs:
% <+OUTPUT1+>
%
%Copyright Frank Villaro-Dixon Creative Commons BY-SA 4.0 2014

View file

@ -140,17 +140,19 @@ autocmd BufNewFile *
\ let hn = substitute(expand("%"), "\\w", "\\u\\0", "g") | \ let hn = substitute(expand("%"), "\\w", "\\u\\0", "g") |
\ let hn = substitute(hn, "\\.", "_", "g") | \ let hn = substitute(hn, "\\.", "_", "g") |
\ let hn = substitute(hn, "/", "_", "g") | \ let hn = substitute(hn, "/", "_", "g") |
\ let mfn = substitute(fn, ".m", "", "") |
\ let cn = expand("%:t:r") | \ let cn = expand("%:t:r") |
\ %s/<+FILENAME+>/\=fn/Ige | \ %s/<+FILENAME+>/\=fn/Ige |
\ %s/<+HEADERNAME+>/\=hn/Ige | \ %s/<+HEADERNAME+>/\=hn/Ige |
\ %s/<+CLASSNAME+>/\=cn/Ige | \ %s/<+CLASSNAME+>/\=cn/Ige |
\ %s/<+MFNAME+>/\=mfn/Ige |
\ unlet fn hn cn | \ unlet fn hn cn |
\ endif | \ endif |
\ unlet skel | \ unlet skel |
\ goto 1 \ goto 1
" skeleton template use <+KEY+> " skeleton template use <+KEY+>
nnoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return> nnoremap ` <esc>/<+.\{-1,}+><return>c/+>/e<return>
inoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return> inoremap ` <esc>/<+.\{-1,}+><return>c/+>/e<return>
" }}} " }}}