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