You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Iury O. G. Figueiredo edited this page Dec 30, 2019
·
4 revisions
Command plugins don't define a install function the plugin file.
They implement functions to be executed at runtime, these functtions can perform any kind of tasks that varies
from changing AreaVi instances mode to connecting to IRC Networks.
A simple example
Consider the situation that you wanted to implement a plugin that exposed a function to be executed from vy and it
outputed on a given AreaVi instance the actual date.
Run vy then press the keycommand below in GLOBAL mode to drop python code:
<Alt-semicolon>
Move the vy cursor to a position where you would like to insert current date then drop the following statement:
date()
Now, you have created your first vy command plugin !
The vyrc file is executed using vyapp.plugins.ENV as environment, it means that whatever it is defined inside ~/.vy/vyrc
it will be defined in vyapp.plugins.ENV. It means the vy command created by the plugin above could be defined
inside the ~/.vy/vyrc file by defining the date function inside the ~/vy/.vyrc file although it doesn't sound good.