Monday, December 17, 2018

Simplify commands' same

Hi,


I use these commands in a plugin:

command! -nargs=0 Explore
\ call explorer#explorePaths(get(b:array,line(".")-1))

command! -nargs=0 ExplorerUniteLauncher
\call explorer#UniteLauncher(get(b:array,line(".")-1))

command! -nargs=0 ExplorerUniteRenamer
\call explorer#UniteRenamer(get(b:array,line(".")-1))

command! -nargs=0 ExplorerUniteDeleter
\call explorer#UniteDeleter(get(b:array,line(".")-1),1)


How can I "register" the arg value which is always the same one :

get(b:array,line(".")-1)

Thank you
NiVa


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: