From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/42079 Path: news.gmane.org!not-for-mail From: Pau Newsgroups: gmane.comp.tex.context Subject: Re: how to comment several lines at once ? Date: Thu, 3 Jul 2008 09:07:53 +0200 Message-ID: <30c383e70807030007v37e71370y5d16ef533acc0dc4@mail.gmail.com> References: <326847810807020605o5375c8d1u30beeca4dfaec36e@mail.gmail.com> <83e5fb980807020655u1c7051bfnde0a91cc8f166216@mail.gmail.com> Reply-To: vim.unix@gmail.com, mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215069137 8457 80.91.229.12 (3 Jul 2008 07:12:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2008 07:12:17 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 03 09:13:02 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KEIzm-0006UV-1c for gctc-ntg-context-518@m.gmane.org; Thu, 03 Jul 2008 09:12:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5719D1FC11; Thu, 3 Jul 2008 09:11:53 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17844-01-35; Thu, 3 Jul 2008 09:11:20 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E32BB1FBFB; Thu, 3 Jul 2008 09:10:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A11A81FC82 for ; Thu, 3 Jul 2008 09:10:40 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17448-04-32 for ; Thu, 3 Jul 2008 09:10:00 +0200 (CEST) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by ronja.ntg.nl (Postfix) with ESMTP id 773A61FBE8 for ; Thu, 3 Jul 2008 09:07:53 +0200 (CEST) Original-Received: by fg-out-1718.google.com with SMTP id l26so288909fgb.8 for ; Thu, 03 Jul 2008 00:07:53 -0700 (PDT) Original-Received: by 10.86.65.11 with SMTP id n11mr9888571fga.64.1215068873182; Thu, 03 Jul 2008 00:07:53 -0700 (PDT) Original-Received: by 10.86.27.5 with HTTP; Thu, 3 Jul 2008 00:07:53 -0700 (PDT) In-Reply-To: <83e5fb980807020655u1c7051bfnde0a91cc8f166216@mail.gmail.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:42079 Archived-At: in vim(rc): function! CommentTeX() map - :s/^/% /:nohlsearch map _ :s/^\s*% \=//:nohlsearch 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 : > 2008/7/2 Alan Stone : >> 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 ___________________________________________________________________________________