octol / vim-cpp-enhanced-highlight

Additional Vim syntax highlighting for C++ (including C++11/14/17)
MIT License
1.06k stars 152 forks source link

parse *.h issue which is related to the path #76

Open jgongquvideo opened 5 years ago

jgongquvideo commented 5 years ago

When I work on webrtc src-code, there is an strange issue found:

My webrtc source root is: ~/dev/webrtc_android/

#step-1 When I open this head-file, the highlight is now right: ~/dev/webrtc_android/src/modules/audio_processing/include/audio_processing.h It looks like this: audio_procssing_hwrong_highlight

#step-2 Then I try to mv this audio_processing.h to another path:
~/dev/test/audio_processing.h and open it with vim. The highlight works well like this: highlight_ok_audio_processing_h

**It seems to relate to the path name.

step-3 Again, I tried another case:**

#step-4: one more test

Up to now, I tried three case:

  1. open the "audio_processing.h" in the original source path----hightlight not ok
  2. copy the special "audio_processing.h" to another totally different path, and open it with vim ----highlight ok
  3. rename another head-file to "audio_processing.h" in original source path, and open it wieh vim----highlight not ok
  4. based on the orignial webrtc source path framework, only mv "audio_processing.h" to another directory----highlight ok

I GUESS: This issue is related to the path name, which is sensitive to "include"?

Other info:

  1. I enable the colorscheme in my .vimrc (refer to my .vimrc for more info)
  2. my vim version: VIM - Vi IMproved 7.4
  3. ubuntu version: Ubuntu 16.04.6 LTS
  4. other *.h works well in the path: ~/dev/webrtc_android/src/modules/audio_processing/include/
  5. even I disable the "colorscheme molokai", the problem still happens
  6. my .vimrc is an link, and attached with the special "audio_processing.h" as gz-file: lrwxrwxrwx 1 jgong jgong 31 8月 12 17:57 .vimrc -> /home/jgong/.spf13-vim-3/.vimrc
  7. attached stuff: hightlight_problem.tar.gz

Is it possible to have a glance to this problem? If your buddy want any other info, please feel free to let me know! Thx!~