Luc Hermitte wrote: > "Harry Putnam" <[email protected]> wrote: > >> I wondered if anyone can show me how to write something for >> commenting better than what I was able to do: >> [...] > > Have a look at EnhancedCommentity.
I think Luc mistyped "EnhancedCommentify" :) But yes, this is the "big gun" for commenting. To answer your original question, you can use visual mode: :vnoremap <f9> :s/^##//<cr> :nnoremap <f9> :.,$s/^##//<cr> :vnoremap <f8> :s/^/##/<cr> :nnoremap <f8> :.,$s/^/##/<cr> If you press <f9> in normal mode, it will uncomment from the current line to the EOF. If you highlight some lines in visual mode and press <f9>, it will only uncomment out those lines. I included similar mappings for <f8> to add the commenting. However the EC plugin Luc mentions is far more advanced and offers a lot of nice features that make it smarter than these "dumb" mappings. -tim --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
