Changes

Jump to navigation Jump to search
841 bytes added ,  12:24, 6 November 2016
Add examples of Vim abbreviations
allows you to remove auxiliary files by pressing <tt>\tc</tt>:
nnoremap <silent><buffer> <leader>tc :<c-u>call ConTeXtClean()<cr>
 
=== Snippets ===
 
Vim allows you to define abbreviations for frequently used pieces of text (see <tt>:help abbreviations</tt>).
Here are a few examples:
iab <buffer> ch. \startchapter[title={}]<cr>\stopchapter<up><c-o>f}
iab <buffer> s. \startsection[title={}]<cr>\stopsection<up><c-o>f}
iab <buffer> ss. \startsubsection[title={}]<cr>\stopsubsection<up><c-o>f}
iab <buffer> sss. \startsubsubsection[title={}]<cr>\stopsubsubsection<up><c-o>f}
iab <buffer> fig. \startplacefigure<cr><cr>\stopplacefigure<up><tab>\externalfigure[][]<c-o>2<left>
iab <buffer> item. \startitemize<cr><cr>\stopitemize<up><tab>\item
iab <buffer> enum. \startitemize[n]<cr><cr>\stopitemize<up><tab>\item
iab <buffer> i. \item
Type the abbreviation (including the dot) followed by <tt>CTRL-]</tt></tt> to expand the snippet, then
continue typing normally.
Abbreviations may be triggered by any other non-keyword character (different from <tt><c-]></tt>),
but in that case such character is inserted in the text.
=== Buffer-local Insert-mode macros to speed up editing ===
In the asciicast at the top of this page µcomplete was used.
=== Snippets UltiSnips ===
Vim allows you to define abbreviations for frequently used pieces of text (see <tt>:help abbreviations</tt>).If you need more sophisticated support for snippets of code, UltiSnips[https://github.com/SirVer/ultisnips]is the plugin to usea sophisticated snippets manager. Here are a few examples of useful UltiSnips snippets for ConTeXt:
snippet "s(tart)?" "start / stop" br
134

edits

Navigation menu