vim matlab good skeleton and octaverc
This commit is contained in:
parent
9b9b1d297c
commit
760cb8f6e0
3 changed files with 14 additions and 3 deletions
3
octaverc
3
octaverc
|
@ -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
8
vim/skeletons/skel.m
Normal 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
|
|
@ -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>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue