diff --git a/doc/NERD_commenter.txt b/doc/NERD_commenter.txt index d7493b1..5309f61 100644 --- a/doc/NERD_commenter.txt +++ b/doc/NERD_commenter.txt @@ -781,6 +781,15 @@ The latest dev versions are on github ============================================================================== 8. Changelog *NERDComChangelog* +2.3.0 + - remove all filetypes which have a &commentstring in the standard vim + runtime for vim > 7.0 unless the script stores an alternate set of + delimiters + - make the script complain if the user doesnt have filetype plugins enabled + - use instead of comma to start the default mappings + - fix a couple of bugs with sexy comments - thanks to Tim Smart + - lots of refactoring + 2.2.2 - remove the NERDShutup option and the message is suppresses, this makes the plugin silently rely on &commentstring for unknown filetypes. diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 3972144..f2c10b9 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -1,9 +1,9 @@ " ============================================================================ " File: NERD_commenter.vim " Description: vim global plugin that provides easy code commenting -" Maintainer: Martin Grenfell -" Version: 2.2.2 -" Last Change: 09th October, 2010 +" Maintainer: Martin Grenfell +" Version: 2.3.0 +" Last Change: 08th December, 2010 " License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute " it and/or modify it under the terms of the Do What The Fuck You @@ -208,7 +208,7 @@ let s:delimiterMap = { \ 'ldif': { 'left': '#' }, \ 'lilo': { 'left': '#' }, \ 'lilypond': { 'left': '%' }, - \ 'liquid': { 'left': '{%', 'right': '%}' }, + \ 'liquid': { 'left': '{% comment %}', 'right': '{% endcomment %}' }, \ 'lisp': { 'left': ';', 'leftAlt': '#|', 'rightAlt': '|#' }, \ 'llvm': { 'left': ';' }, \ 'lotos': { 'left': '(*', 'right': '*)' }, @@ -1002,6 +1002,10 @@ function! NERDComment(isVisual, type) range let oldIgnoreCase = &ignorecase set noignorecase + if !exists("g:did_load_ftplugin") || g:did_load_ftplugin != 1 + call s:NerdEcho("filetype plugins should be enabled. See :help NERDComInstallation and :help :filetype-plugin-on", 0) + endif + if a:isVisual let firstLine = line("'<") let lastLine = line("'>") @@ -2401,10 +2405,10 @@ endfunction function s:NerdEcho(msg, typeOfMsg) if a:typeOfMsg == 0 echohl WarningMsg - echo 'NERDCommenter:' . a:msg + echom 'NERDCommenter:' . a:msg echohl None elseif a:typeOfMsg == 1 - echo 'NERDCommenter:' . a:msg + echom 'NERDCommenter:' . a:msg endif endfunction