Re: [NTG-context] how to comment several lines at once ?

Top Page
Author: Pau
Date:  
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] how to comment several lines at once ?
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@???>:
> 2008/7/2 Alan Stone <software.list.1es9s@???>:
>> 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@??? / 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@??? / 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
___________________________________________________________________________________