No highlight on Vim script
See original GitHub issueRepro
- Code
var hljs = require('highlight.js');
var code =
`
let found = 0
for a in args
if filereadable(a)
found = 1
endif
endfor
if !found
echoerr 'No file included!'
endif
let conf = {'command': 'redpen'}
let redpen_conf = unite#sources#redpen#detect_config(expand('%:p'))
if redpen_conf !=# ''
let conf.cmdopt = '-c ' . redpen_conf . ' 2>/dev/null'
endif
call quickrun#run(conf)
`;
var result = hljs.highlight('vim', code);
console.log(result.value);
- Output
let found = 0
for a in args
if filereadable(a)
found = 1
endif
endfor
if !found
echoerr 'No file included!'
endif
let conf = {'command': 'redpen'}
let redpen_conf = unite#sources#redpen#detect_config(expand('%:p'))
if redpen_conf !=# ''
let conf.cmdopt = '-c ' . redpen_conf . ' 2>/dev/null'
endif
call quickrun#run(conf)
Nothing looks highlighted 😢
Environment
- Highlight.js 9.2.0
- OS X 10.11.4
- Node.js 5.6.0
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Vim clear last search highlighting - Stack Overflow
After doing a search in Vim, I get all the occurrences highlighted. How can I disable that? I now do another search for...
Read more >Turn On or Off Color Syntax Highlighting In vim Editor - nixCraft
The following instructions show you how to enable or disable syntax colors for VI/VIM text editor running on a Linux or Unix-like system....
Read more >How can I clear word highlighting in the current document ...
To cause vim to highlight some text without jumping to it, you can :let @/="some text". In these expressions, @ lets you refer...
Read more >How to Disable VIM Syntax Highlighting - Linux Hint
In this article we show how to configure your .vimrc file to disable syntax highlighting automatically when opening files.
Read more >Basic Syntax Highlighting - Learn Vimscript the Hard Way
Opening a new Vim window causes Vim to reload all your bundled files for that window, whereas using a split does not. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Merged. Thanks a lot! I also just pushed one more fix to a different language (Gauss) that was causing mis-detection of your particular snippet. Pretty good improvement overall 😃
I fixed again 😄