Interface ViOptionBag

All Known Subinterfaces:
All Known Implementing Classes:
Buffer, DefaultBuffer, TextView

public interface ViOptionBag

Interface for classes that have vim options, i.e. ViTextView and Buffer aka G.curwin and G.curbuf; these are per document and per window options. Multiple views/windows of the same document share the Buffer variables; for example, if you do ":set sw=8" on a file, any open windows into that file all have the same shiftwidth. Global options are static and are found in G.

The values are initialized from global options and change with the set command. The options are referenced by name through curwin and curbuf and notification is sent with viOptionSet(com.raelity.jvi.ViTextView, java.lang.String) when one of its options changes. These options may interact with paltform features, and activateOptions(com.raelity.jvi.ViTextView) is invoked when a window becomes active. For example, on the NetBeans platform the 'number' option is a global, but jVi treats it like a window option. Look at org.netbeans.modules.jvi.NbTextView to see how the option w_p_nu is handled; and org.netbeans.modules.jvi.NbBuffer shows some handling of buffer options.

Method Summary
 void activateOptions(ViTextView tv)
          This is invoked when switchto bag's associated editor.
 void viOptionSet(ViTextView tv, String name)
          The set command used to change an option

Method Detail


void viOptionSet(ViTextView tv,
                 String name)
The set command used to change an option


void activateOptions(ViTextView tv)
This is invoked when switchto bag's associated editor.