Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call to s:delimiterMap #47

Closed
juanpabloaj opened this issue Oct 24, 2011 · 6 comments
Closed

call to s:delimiterMap #47

juanpabloaj opened this issue Oct 24, 2011 · 6 comments

Comments

@juanpabloaj
Copy link

How I can call to s:delimiterMap from other functions?
// for not re write a similar dic with comments chars

@scrooloose
Copy link
Collaborator

Hi :)

Currently you cant, although you could stick this line underneath the
s:delimiterMap definition:

let g:NERDCommenterDelimiters = s:delimiterMap

then you can access s:delimiterMap through g:NERDCommenterDelimiters.
e.g. :echo g:NERDCommenterDelimiters['ruby']

I could add functions to access/modify the delimiter map. Let me know
what you think :)

Cheers
Marty

On 10/24/2011 09:49 PM, JuanPablo wrote:

How I can call to s:delimiterMap from other functions?
// for not re write a similar dic with comments chars

@juanpabloaj
Copy link
Author

yes, I think in a solution similar to

 let g:NERDCommenterDelimiters = s:delimiterMap

maybe functions to access/modify the delimiter map is a util tool for other plugins to use the NERDCommenter as a dependency

@tiesmaster
Copy link

I also like to see possibility to add an option to the delimiter map from a different location. Now, I'm patching NERD_commenter.vim, but this gets overridden by every update of Janus.

Do you want me to fork and patch?

Great plugin, though!

@alerque
Copy link
Member

alerque commented May 24, 2016

Is this something that access to the g:NERDCustomDelimiters array doesn't handle? For example in your rc file you can override one set of delimiters like this:

let g:NERDCustomDelimiters = { 'pascal': { 'left': '(*','right': '*)' } }

@tiesmaster or @juanpabloaj, is there some use case that this functionality doesn't allow for?

@alerque
Copy link
Member

alerque commented May 24, 2016

Nevermind, I think I get it. You're trying to get data out of the plugin, not add or manipulate what's in the plugin.

@alerque
Copy link
Member

alerque commented May 24, 2016

This appears to have been fixed in 6549cfd so the map is globally accessible. If there is anything else left to do please comment back.

@alerque alerque closed this as completed May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants