aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-08-17 08:52:32 +0200
committerMichał Górny <mgorny@gentoo.org>2019-08-17 08:52:32 +0200
commit50323c29c07bb23db971ce34846c607ddd440fe3 (patch)
treee1d580f889fbae3692d49ef1134a863b3e87dd0a
parentnewglep: Use https:// for CC license URL (diff)
downloadgentoo-syntax-50323c29.tar.gz
gentoo-syntax-50323c29.tar.bz2
gentoo-syntax-50323c29.zip
newebuild: Support acct-{group,user} categories
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--plugin/newebuild.vim24
1 files changed, 21 insertions, 3 deletions
diff --git a/plugin/newebuild.vim b/plugin/newebuild.vim
index dd195ee..26d5a9f 100644
--- a/plugin/newebuild.vim
+++ b/plugin/newebuild.vim
@@ -58,7 +58,25 @@ fun! <SID>MakeNewEbuild()
else
put ='EAPI=7'
put =''
- if l:category ==# "app-vim"
+ if l:category ==# "acct-group"
+ " {{{ acct-group special setup
+ put ='inherit acct-group'
+ put =''
+ put ='ACCT_GROUP_ID='
+ " }}}
+ elseif l:category ==# "acct-user"
+ " {{{ acct-user special setup
+ let l:username=substitute(expand("%:t:r"),
+ \ "\\(.*\\)-[0-9]*.*", "\\1", "")
+ put ='inherit acct-user'
+ put =''
+ put ='DESCRIPTION=\"\"'
+ put ='ACCT_USER_ID='
+ put ='ACCT_USER_GROUPS=( ' . l:username . ' )'
+ put =''
+ put ='acct-user_add_deps'
+ " }}}
+ elseif l:category ==# "app-vim"
" {{{ app-vim special setup
put ='#VIM_PLUGIN_VIM_VERSION=\"7.0\"'
put ='inherit vim-plugin'
@@ -159,8 +177,8 @@ fun! <SID>MakeNewEbuild()
" {{{ go to the first thing to edit
0
- /^\(DIST_AUTHOR\|DESCRIPTION\)=/
- exec "normal 2f\""
+ /^\(ACCT_GROUP_ID\|DIST_AUTHOR\|DESCRIPTION\)=/
+ exec "normal f=ll"
nohls
" }}}
endif