-
Notifications
You must be signed in to change notification settings - Fork 54
Syntax Highlighter
Iury O. G. Figueiredo edited this page Aug 24, 2016
·
3 revisions
The vy syntax highlight plugin works for all languages that python pygments library works for. In order to highligh the inserted text based on the file extension, just press:
<Escape>
The vy syntax highlight plugin uses pygments to highlight source code so it is possible to use python pygments styles with vy. Check out python pygments syntax highlight styles.
In the vyrc file, comment the lines that import the default style and do the import of the desired style as shown below.
# default style.
# from vyapp.plugins.syntax.styles.vy import VyStyle
# autoload(vyapp.plugins.syntax.spider, VyStyle())
from pygments.styles.tango import TangoStyle
autoload(vyapp.plugins.syntax.spider, TangoStyle())
It is possible to implement new syntax highlight styles and do the import from the vyrc file. As vy uses python pygments to do syntax highlight, check out creation of new styles from python pygments.