fidian / hexmode

Vim plugin to edit binary files in a hex mode automatically.
147 stars 19 forks source link

Fixed a small typo in docs. #8

Closed m4c0 closed 8 years ago

fidian commented 8 years ago

I'm trying this in my vim and it is not working for me.

:echo g:hexmode_patterns
*.bin,*.exe,*.so,*.jpg,*.jpeg,*.gif,*.png,*.pdf,*.tiff
:let g:hexmode_patterns += "*.jpg"
:echo g:hexmode_patterns
0

Shouldn't the command be let g:hexmode_patterns .= ",*.jpg" (with .= and a comma before the *.jpg)?

chaoren commented 8 years ago

Additional file patterns may be added by modifying the g:hexmode_patterns variable in your vimrc:

This also won't work unless you explicitly runtime the plugin in your vimrc first, which some plugin managers won't do. I would suggest instead that you create a separate g:hexmode_patterns_extra variable that the user can set directly, and you just append that to g:hexmode_patterns.