ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: davidnebauer@hotkey.net.au,
	 mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Vim snippets
Date: Mon, 22 Feb 2016 09:52:41 -0500 (EST)	[thread overview]
Message-ID: <alpine.OSX.2.02.1602220950470.6926@nqv-znpobbx> (raw)
In-Reply-To: <56CADAA4.30708@bigpond.com>

[-- 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
___________________________________________________________________________________

  reply	other threads:[~2016-02-22 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22  9:53 David Nebauer
2016-02-22 14:52 ` Aditya Mahajan [this message]
2016-02-29 23:01 ` Nicola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.02.1602220950470.6926@nqv-znpobbx \
    --to=adityam@umich.edu \
    --cc=davidnebauer@hotkey.net.au \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).