cornelis icon indicating copy to clipboard operation
cornelis copied to clipboard

Tab completion for simplification modes

Open isovector opened this issue 2 years ago • 0 comments

Set a CmdComplete CommandOption, and then follow the docs:

The following example lists user names to a Finger command 
    :com -complete=custom,ListUsers -nargs=1 Finger !finger <args>
    :fun ListUsers(A,L,P)
    :    return system("cut -d: -f1 /etc/passwd")
    :endfun

The following example completes filenames from the directories specified in
the 'path' option: 
    :com -nargs=1 -bang -complete=customlist,EditFileComplete
			\ EditFile edit<bang> <args>
    :fun EditFileComplete(A,L,P)
    :    return split(globpath(&path, a:A), "\n")
    :endfun

isovector avatar Jun 14 '22 11:06 isovector