Skip to content

jrunning/source-highlight-solarized

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

source-highlight-solarized

A set of Solarized .style and .outlang files for GNU Source-highlight. I made this parimarily for pretty source highlighting when using less. See below for less-specific instructions.

NOTE: This is neither finished nor in active development, but I will take PRs and try to review them as they come in.

Installation

  1. Install Source-highlight using your preferred method (build it yourself according to the manual or use a package manager, e.g. apt-get install source-highlight or brew install source-highlight).

  2. Run source-highlight-settings. This will tell you where your datadir is and give you a chance to change it (you won't need to, but note the path).

  3. You have two options now:

  4. Copy (or symlink) the *-solarized.style and *-solarized.outfile files to datadir and invoke them manually with Source-highlight's -f and --style-file options (a good option if you're only going to use Source-highlight with less).

  5. Overwrite the old files, e.g. copy esc-solarized.style over esc.style and esc-solarized.outlang over esc.lang (or move the original files and symlink the solarized files).

Using with less

To automatically Source-highlight files when using less, just add the following lines to your .bashrc (or shell equivalent):

export LESSOPEN="| source-highlight -f esc-solarized \
  --style-file=esc-solarized.style -i %s -o STDOUT"
export LESS=" -R "

Or, if you overwrote/removed the original *.style and *.outlang files:

export LESSOPEN="| source-highlight -f esc -i %s -o STDOUT"
export LESS=" -R "

Now use less as usual and supported files will be highlighted.

Extras

Look in extras/ for an updated ruby.lang file, because Source-highlight's original wasn't great. Copy or symlink this to datadir just like the other files. The included file still needs work. Feel free to...

Contribute

To contribute, just do a pull request and I'll review it as soon as I can.

See the Source-highlight docs for information on its lang, outlang, and style syntaxes.

TODO

  • Implement light as well as dark color schemes.
  • Figure out the correct ANSI codes for bold/italic on the terminal and how to use them in esc-solarized.outlang.
  • Implement other *.outlang files.
  • Make it as pretty as vim-colors-solarized in as many cases as possible.

About

Solarized .style and .outlang files for GNU source-highlight

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published