File: tiny_cmd.vim

package info (click to toggle)
vim-addon-mw-utils 0.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 132 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 333 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
" vim suffers:

exec vam#DefineAndBind('s:c','g:vim_tiny_cmd', '{}')

fun! tiny_cmd#Put(a)
  let new = get(s:c,'next',0) +1
  let s:c['next'] = new
  let s:c[new] = a:a
  return new
endf

fun! tiny_cmd#Get(nr)
  return s:c[a:nr]
endf

" Get and remove item
fun! tiny_cmd#Pop(nr)
  let r = s:c[a:nr] | unlet s:c[a:nr] | return r
endf