From: Pau <vim.unix@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: how to comment several lines at once ?
Date: Thu, 3 Jul 2008 09:07:53 +0200 [thread overview]
Message-ID: <30c383e70807030007v37e71370y5d16ef533acc0dc4@mail.gmail.com> (raw)
In-Reply-To: <83e5fb980807020655u1c7051bfnde0a91cc8f166216@mail.gmail.com>
in vim(rc):
function! CommentTeX()
map - :s/^/% /<CR>:nohlsearch<CR>
map _ :s/^\s*% \=//<CR>:nohlsearch<CR>
set comments=:%
endfunction
autocmd FileType tex call CommentTeX()
This way, in visual you select the part of the document you want to
comment, then press -
and, voila, you get a % in fornt of every line. To uncomment, press _
2008/7/2 Diego Depaoli <trebestie@gmail.com>:
> 2008/7/2 Alan Stone <software.list.1es9s@gmail.com>:
>> Hi,
>>
>> Guess this is (Plain) TeX stuff - haven't found the answer...
>>
>> How do you comment several lines at once, instead of prefixing each line
>> with the % sign ?
> in vim
> :A,Bs/^/%
> A=start line
> B=end line
>
> --
> Diego Depaoli
> ___________________________________________________________________________________
> 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 : https://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2008-07-03 7:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 13:05 Alan Stone
2008-07-02 13:08 ` Andrea Valle
2008-07-02 13:11 ` Martin Schröder
2008-07-02 13:11 ` Wolfgang Schuster
2008-07-03 11:20 ` Henning Hraban Ramm
2008-07-02 13:14 ` Hans van der Meer
2008-07-02 13:55 ` Diego Depaoli
2008-07-03 7:07 ` Pau [this message]
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=30c383e70807030007v37e71370y5d16ef533acc0dc4@mail.gmail.com \
--to=vim.unix@googlemail.com \
--cc=ntg-context@ntg.nl \
--cc=vim.unix@gmail.com \
/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).