From 6549cfde45339bd4f711504196ff3e8b766ef5e6 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Tue, 8 Jul 2014 09:21:57 +0100 Subject: [PATCH] make the delimitermap a global variable This allows people to edit the delimiters at run time. The option NERDCustomDelimiters can be used in a vimrc (or similar) but is not useful after vim has loaded. So just open up the s:delimiterMap hash. --- plugin/NERD_commenter.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 13c7693..b7ba977 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -406,6 +406,8 @@ let s:delimiterMap = { \ 'z8a': { 'left': ';' } \ } +let g:NERDDelimiterMap = s:delimiterMap + if exists("g:NERDCustomDelimiters") call extend(s:delimiterMap, g:NERDCustomDelimiters) endif