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

When g:NERDAltDelims_java is set to 1,sometimes it will use another comment style #422

Open
termanary opened this issue Apr 3, 2020 · 1 comment
Labels

Comments

@termanary
Copy link

termanary commented Apr 3, 2020

nerdcommenter:Jul 31 2018 -> Date from git.
It is the version I am using now. And I download the newest one, the problem still exist.
vimrc:

filetype plugin indent on
let g:NERDAltDelims_c = 1
let g:NERDAltDelims_java = 1

shell cmd: $ vim vim.vim or $ vim py.py

I think the filetype I am opening is unimportant.

vim cmd: :vs java.java or :vs c.c

The problem will show up, too.
type:<C-w>l<C-w>h
Jump to the window of vim.vim then jump back.

Then nerdcommenter will use another comment style.
I have seen some similar problems in the issue list.#342 is a similar problem.
I found that the b:NERDCommenterDelims is been modified unproperly.
The reason is the function s:SwitchToAlternativeDelimiters is called.
But I then could not find out where and why it is call.

@alerque alerque added the bug label Jun 8, 2020
@alerque
Copy link
Member

alerque commented Jun 8, 2020

This is probably a bug in relation to variable scope. We're probably doing something with global variables that we should be keeping to buffer scope. I'd love to see this rooted out if anybody wants to contribute a fix for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants