Changes

Jump to navigation Jump to search
2,123 bytes added ,  12:45, 30 October 2016
no edit summary
Finally, for each of the above variables, a corresponding buffer-local variable with the same name may be defined,
whose value takes precedence over the global value.
 
=== Editing features ===
 
You may use the following commands to quickly jump to different parts of your document:
 
* <tt>[[</tt>: jump to the start of the previous subject/section/chapter/part/component/product;
* <tt>]]</tt>: jump to the start of the next subject/section/chapter/part/component/product;
* <tt>[]</tt>: jump to the previous end of section, chapter, etc…;
* <tt>][</tt>: jump to the next end of section, chapter, etc…;
* <tt>[{</tt>: jump to the previous <tt>\start…</tt> or <tt>\setup…</tt> command;
* <tt>]}</tt>: jump to the next <tt>\stop…</tt> or <tt>/setup…</tt> command;
 
Each of the above accepts an optional count. For example, if you type <tt>3[{</tt> you will jump
three <tt>\start…</tt> commands before.
 
You may use the following ConTeXt-specific text objects, to be used in Visual or Operator-pending mode
(see <tt>:help text-objects</tt>):
 
* <tt>i$</tt>: inside <tt>$…$</tt> (dollars excluded);
* <tt>a$</tt>: around <tt>$…$</tt> (dollars included);
* <tt>tp</tt>: a ConTeXt paragraph.
 
So, for example, you may copy (“yank” in Vim's jargon) a paragraph by typing <tt>ytp</tt> (“yank a TeX
paragraph“), delete it with <tt>dtp</tt>, select it with <tt>vtp</tt> and so on. In particular, you may reflow
a paragraph with <tt>gqtp</tt> (see <tt>:help gq</tt>).
Similarly, you may yank a formula with <tt>vi$</tt> (or <tt>va$</tt>), and delete it, select it, etc…, in a
similar fashion.
 
If you have enabled the <tt>matchit</tt> plugin included in Vim (see <tt>:help matchit</tt>), you may also
type <tt>%</tt> to jump between the start and the stop of a command, or between parentheses.
 
You may jump to a different file by positioning the cursor over the file name and typing <tt>gf</tt> (<tt>:help gf</tt>).
For example, if you have the following in your document:
\component my_component
putting the cursor over <tt>my_component</tt> and pressing <tt>gf</tt> will open <tt>my_component.tex</tt>.
 
Vim searches for files in the locations specified by the <tt>path</tt> option (this is a Vim feature). So, you may
have to set <tt>path</tt> for the above to work.
 
== Other useful vim plugins ==
134

edits

Navigation menu