" Vim filetype plugin " Language: HP-41 " Version: 0.6 " Maintainer: Geir Isene " Last Change: 2005-09-17 " URL: http://www.geir.isene.com/ " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 set nrformats-=octal imap 0A imap LBL imap *LBL " imap GTO imap GTO imap RTN imap RTN imap STOP imap STOP imap ISG imap ISG imap DSE imap DSE imap RCL imap RCL imap STO imap STO imap XEQ imap XEQ imap ENTER imap ENTER imap X<>Y imap X<>Y imap PROMPT imap PROMPT imap VIEW imap VIEW imap AVIEW imap AVIEW imap CLX imap CLX map :%s/'.*//gggG4d imap :call Renumber()a map :call Renumber() if !exists("*s:Renumber") function Renumber() let s:linenumber = line(".") let s:colnumber = col(".") call cursor(1,1) let @r = 1 exe "normal 0cw".printf("%03d", @r) 2,$s#^\d\d\d #\=printf("%03d ", @r + setreg('r', @r+1))# call cursor(s:linenumber,s:colnumber) endfunction endif