* Vim snippets @ 2016-02-22 9:53 David Nebauer 2016-02-22 14:52 ` Aditya Mahajan 2016-02-29 23:01 ` Nicola 0 siblings, 2 replies; 3+ messages in thread From: David Nebauer @ 2016-02-22 9:53 UTC (permalink / raw) To: ntg-context Hi, Newbie question: are there any vim snippets available for context? The context wiki vim page (<http://wiki.contextgarden.net/Vim>) makes no mention of any. I couldn't find anything on github (but there are hundreds of matches since "context" is such a generic word). ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Vim snippets 2016-02-22 9:53 Vim snippets David Nebauer @ 2016-02-22 14:52 ` Aditya Mahajan 2016-02-29 23:01 ` Nicola 1 sibling, 0 replies; 3+ messages in thread From: Aditya Mahajan @ 2016-02-22 14:52 UTC (permalink / raw) To: davidnebauer, mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 263 bytes --] On Mon, 22 Feb 2016, David Nebauer wrote: > Newbie question: are there any vim snippets available for context? I use the attached (tuned to my writing style and this depends on latex suite for IMAP functions). This file is placed in $VIM/after/ftplugin Aditya [-- Attachment #2: Type: TEXT/PLAIN, Size: 1569 bytes --] if !exists('loaded_snippet') || &cp finish endif let st = g:snip_start_tag let et = g:snip_end_tag let cd = g:snip_elem_delim let bt = st.et let si = IMAP_GetPlaceHolderStart() let ei = IMAP_GetPlaceHolderEnd() exec "Snippet for \\startformula<CR>".st.et."<CR>\\stopformula".si.ei exec "Snippet pfor \\placeformula[".st."tag".et."] \\startformula<CR>".st.et."<CR>\\stopformula".si.ei exec "Snippet fora \\startformula \\startalign<CR>".st.et."<CR>\\stopalign \\stopformula".si.ei exec "Snippet pfora \\placeformula[".st."tag".et."] \\startformula \\startalign<CR>".st.et."<CR>\\stopalign \\stopformula".si.ei " Stepping exec "Snippet Step \\StartStep ".st. "step".et."<CR>\\StopStep".si.ei " Slides exec "Snippet head \\starthead {".st."head".et."}<CR>\\startindented<CR>".st.et."<CR>\\stopindented<CR>\\stophead" " Solution exec "Snippet soln \\startsolution<CR>".st. et."<CR>\\stopsolution" " For specific project exec "Snippet FL \\FIELD ".bt exec "Snippet AL \\ALPHABET ".bt exec "Snippet FS \\FSPACE ".bt exec "Snippet WN \\WINDOW ".bt " exec "Snippet sub \\subsection{".st."name".et."}\\label{sub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et " exec "Snippet $$ \\[<CR>".st.et."<CR>\\]<CR>".st.et " exec "Snippet ssub \\subsubsection{".st."name".et."}\\label{ssub:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et " exec "Snippet itd \\item[".st."desc".et."] ".st.et " exec "Snippet sec \\section{".st."name".et."}\\label{sec:".st."name:substitute(@z,'.','\\l&','g')".et."}<CR>".st.et " [-- Attachment #3: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Vim snippets 2016-02-22 9:53 Vim snippets David Nebauer 2016-02-22 14:52 ` Aditya Mahajan @ 2016-02-29 23:01 ` Nicola 1 sibling, 0 replies; 3+ messages in thread From: Nicola @ 2016-02-29 23:01 UTC (permalink / raw) To: ntg-context On 2016-02-22 10:23:40 +0000, David Nebauer said: > Hi, > > Newbie question: are there any vim snippets available for context? I don't know of any (apart from what has already been posted). Are you using UltiSnips? Here are a few I am using, adapted from tex.snippets: snippet "s(tart)?" "start / stop" br \start${1:something} ${0:${VISUAL}} \stop$1 endsnippet snippet enum "Enumerate" b \startitemize[n] \item $0 \stopitemize endsnippet snippet item "Itemize" b \startitemize \item $0 \stopitemize endsnippet snippet it "Individual item" b \item $0 endsnippet IMHO, it takes less to write your own snippets perfectly suited to your writing style (e.g., I like a newline after each \item) than trying to understand (sometimes overly complicated) snippets written by others. Nicola ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-29 23:01 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-02-22 9:53 Vim snippets David Nebauer 2016-02-22 14:52 ` Aditya Mahajan 2016-02-29 23:01 ` Nicola
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).