mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-02-21 03:40:22 +08:00
Merge branch 'master' of git://github.com/scrooloose/nerdcommenter
This commit is contained in:
commit
ca6c791114
@ -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 <leader> 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.
|
||||
|
@ -1,9 +1,9 @@
|
||||
" ============================================================================
|
||||
" File: NERD_commenter.vim
|
||||
" Description: vim global plugin that provides easy code commenting
|
||||
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
|
||||
" Version: 2.2.2
|
||||
" Last Change: 09th October, 2010
|
||||
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
|
||||
" 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user