-
Notifications
You must be signed in to change notification settings - Fork 30
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
Incorrect highlighting, when file are open from [g]vim menu #20
Comments
If you do in Vim |
Sorry for late reply. In case when plugin works well I get this: |
I'm sorry, I have no idea. My best guess would be that you have a file somewhere that is checking whether vim is running as gvim and then setting |
Sorry, by 'all your files', I mean all of your ~/.vim files. |
This trouble is identical in vim and gvim. Also, I've put plugin in ~/.vim/plugin directory. Because if I move it in ~/.vim/ftplugin it doesn't work at all. I've recreated home directory for user, problem is still here. 3 directories, 5 files And .vimrc: |
It should work in the ftplugin folder. Try removing the following lines from the top of the html.vim file to see if this resolves the problem:
|
Unfortunately, that's didn't help. |
Maybe it's some bug in debian build of vim, I dont know at all. |
How do you open a file once vim is running? If you describe the steps maybe that will help. Also, try |
Having the same issue here. As soon as I load a file into vim not opening it right away as cli parameter from the shell, the plugin doesn't work anymore. For example via calling Would really appreciate a fix for this. Thanks for a great plugin ;-) |
Are there any similarities with your setup and the one described above? I can't reproduce this. You guys are going to have to debug it. See if you can narrow down the problem by temporarily removing other plugins, commenting out guard lines of code as I suggested above etc. @Sloun, did you resolve this issue? |
Modifying line 10 did the trick for me: 9 augroup matchhtmlparen 10 autocmd! CursorMoved,CursorMovedI,WinEnter <buffer> call s:Highlight_Matching_Pair() 11 augroup END I'm not that familiar with vim autocommands, so I honestly have no idea what side effects this may cause. I substituted [buffer] by an asterisk and it works like a charm, even with NERDtree. Oh, btw. I noticed some weird behavior as well: having a tag highlighted in the first buffer and then opening a copy in a second buffer leads to the same tag being highlighted in the second buffer. But nothing happens when repositioning the cursor. In the first buffer all works fine, when I switch back to that.... |
By substituting an asterisk, this function will be being called for every buffer you open. It suggests that this block is called at least once but not for every buffer. Do you always start vim/gvim with a file argument? |
@gregsexton Unfortunately, no. The issue is still here. |
@gregsexton Yes, in most cases I do start vim with a file argument. Out of curiousity: why don't we wanna call the auto command for every buffer? We certainly want the highlighting to work for every buffer, right? |
If you don't start with a file argument and open files from within Vim, does the issue still occur? Not every buffer has tags. With an asterisk it will be applied to every buffer regardless of whether this is appropriate. You could substitute for something like *.html but that defeats being able to symlink the file to provide the functionality for other file types. |
Yes, the plugin's only working as long as I open the file as an argument. Maybe a white list variable for file extensions that do usually contain tags to substitute that asterisk? |
Having the same problem |
I can't get working html.vim plugin if I open vim first, and then open some file (e.g. open test.html or via NERDTree). In this situation I have this: http://s18.postimg.org/miqsywm8p/Selection_2013_04_24_03_21.png
But if I open file via terminal (gvim test.html) plugin works perfectly: http://s24.postimg.org/sxoaypr45/Selection_2013_04_24_03_22.png
vim version: 7.3.547 (Debian testing)
Thank you.
The text was updated successfully, but these errors were encountered: