Writing profiles for fun

Neven Has haski at sezampro.yu
Tue Oct 15 14:34:58 PDT 2002

Yes, being lazy is a wonderful thing. ;)

Even though I'm just updating my profile to 4.0, there are a lot of
elements that have to be added, so just before Chapter 6, which is sooo
long and boring, this thing crossed my mind.

It's a Vim plugin (or whatever it's called) for easier adding of new
ALFS elements.

I'm not a Vim guru, so it might look primitive, but it works. Feel free
to improve it. For example, adding <option> in elements that use it
would be good, as it's much easier to remove it with two key strokes,
than to write it. One can add the mappings for those inner elements too,
like <source> and <destination>. Also, we could automatically add three
<stages> in <package>, etc. etc.

When you're few TABs away from the first column, the inserted element
won't be indented well. I would like to see that fixed too, for example.

BTW, just :source it and it's "ALT-a NNN" in Insert mode. NNN can be
"mkd" for <mkdir>, "con" for <configure> etc.

Also, if you type slow, you could ":set timeout!", or something.

Hope you find it useful,

-------------- next part --------------
" Vim file for making the creation of ALFS profiles fun.
" Written by Neven Has <haski at sezampro.yu>
" Do improve and modify, but please send me the changes too.

imap <M-a>alf 
	\<alfs version=""><CR>

imap <M-a>che 

imap <M-a>con 
	\<configure base=""><CR>

imap <M-a>cop 

imap <M-a>exe 
	\<execute command="" base=""><CR>

imap <M-a>lin 
	\<link base=""><CR>

imap <M-a>mak 
	\<make base=""><CR>

imap <M-a>mkd 
	\<mkdir base=""><CR>

imap <M-a>mov 

imap <M-a>own 
	\<ownership user="" group=""><CR>

imap <M-a>pac 
	\<package name="" version=""><CR>

imap <M-a>pat 
	\<patch base=""><CR>
	\<Tab><param>-i </param><CR>

imap <M-a>per 
	\<permissions base="" mode=""><CR>

imap <M-a>rem 

imap <M-a>sea 

imap <M-a>sta 

imap <M-a>stm 
	\<stamp name="" version=""/>

imap <M-a>tex 

imap <M-a>unp 

More information about the alfs-discuss mailing list