Skip to content
Branch: master
Find file History
Latest commit ca9b1d7 Dec 21, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
LICENSE Merge branch 'master' into view-refactor Mar 27, 2017
PowerShell.yaml Create PowerShell.yaml Mar 21, 2018
README.md Update readme Sep 29, 2017
ada.yaml #964 add ada syntax Dec 27, 2017
apacheconf.yaml Add skip statements to all strings Mar 29, 2017
arduino.yaml Add skip statements to all strings Mar 29, 2017
asciidoc.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
asm.yaml Add skip statements to all strings Mar 29, 2017
ats.yaml Update ats syntax (#1141) Jul 16, 2018
awk.yaml Add skip statements to all strings Mar 29, 2017
c++.yaml Add converted syntax files Mar 21, 2017
c.yaml Fix some keywords being mistakenly highlighted in C syntax Aug 7, 2018
caddyfile.yaml Add skip statements to all strings Mar 29, 2017
clojure.yaml match .edn files Oct 16, 2018
cmake.yaml Add skip statements to all strings Mar 29, 2017
coffeescript.yaml Add skip statements to all strings Mar 29, 2017
colortest.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
conf.yaml Add skip statements to all strings Mar 29, 2017
conky.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
cpp.yaml Add skip statements to all strings Mar 29, 2017
crontab.yaml added crontab highlighting. (#689) Jun 10, 2017
crystal.yaml Add skip statements to all strings Mar 29, 2017
csharp.yaml Add skip statements to all strings Mar 29, 2017
css.yaml Add skip statements to all strings Mar 29, 2017
cython.yaml Add skip statements to all strings Mar 29, 2017
d.yaml Add skip statements to all strings Mar 29, 2017
dart.yaml Add skip statements to all strings Mar 29, 2017
dockerfile.yaml Use type.keyword instead of keyword Sep 13, 2017
dot.yaml Add skip statements to all strings Mar 29, 2017
elixir.yaml Elixir configuration (#1118) May 26, 2018
erb.yaml Add converted syntax files Mar 21, 2017
erlang.yaml Add syntax file for Erlang Nov 23, 2018
fish.yaml Add skip statements to all strings Mar 29, 2017
fortran.yaml Add skip statements to all strings Mar 29, 2017
fsharp.yaml F# Configuration May 29, 2018
gdscript.yaml Improve the GDScript syntax file Aug 7, 2018
gentoo-ebuild.yaml Add skip statements to all strings Mar 29, 2017
gentoo-etc-portage.yaml Changed filename detection for Gentoo etc-portage to include detectio… Oct 19, 2018
git-commit.yaml Remove weird ignore on git-commit Jan 5, 2018
git-config.yaml Use type.keyword instead of keyword Sep 13, 2017
git-rebase-todo.yaml Remove weird ignore on git-commit Jan 5, 2018
glsl.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
go.yaml Move incomplete colorschemes and improve cd Nov 23, 2017
golo.yaml Add skip statements to all strings Mar 29, 2017
graphql.yaml Basic syntax highlighting for Graphql based on the official specifica… Aug 24, 2018
groff.yaml Add converted syntax files Mar 21, 2017
haml.yaml Add converted syntax files Mar 21, 2017
haskell.yaml Add skip statements to all strings Mar 29, 2017
html.yaml
html4.yaml Fix some issues with unicode syntax highlighting Mar 27, 2017
html5.yaml Fix some issues with unicode syntax highlighting Mar 27, 2017
ini.yaml Highlight .tscn, .tres and project.godot files using INI syntax Sep 29, 2018
inputrc.yaml Add converted syntax files Mar 21, 2017
java.yaml Add skip statements to all strings Mar 29, 2017
javascript.yaml Merge pull request #1202 from luizbills/patch-1 Dec 10, 2018
json.yaml Add skip statements to all strings Mar 29, 2017
julia.yaml
keymap.yaml Add skip statements to all strings Mar 29, 2017
kickstart.yaml Add converted syntax files Mar 21, 2017
kotlin.yaml Added kotlin highlighting and fixed swift line comment todo not highl… May 26, 2017
ledger.yaml
lfe.yaml Add converted syntax files Mar 21, 2017
lilypond.yaml Add skip statements to all strings Mar 29, 2017
lisp.yaml Add converted syntax files Mar 21, 2017
lua.yaml Lua syntax improvements; fixes #1155, fixes #1136 Aug 18, 2018
mail.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
makefile.yaml Fix Makefile = highlighting Jan 18, 2018
man.yaml Add converted syntax files Mar 21, 2017
markdown.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
micro.yaml Fix micro file syntax Dec 30, 2017
mpdconf.yaml Add converted syntax files Mar 21, 2017
nanorc.yaml Add converted syntax files Mar 21, 2017
nginx.yaml Add converted syntax files Mar 21, 2017
nim.yaml Add converted syntax files Mar 21, 2017
objc.yaml Add skip statements to all strings Mar 29, 2017
ocaml.yaml Improve ocaml syntax highlighting Jan 31, 2018
octave.yaml Added initial support for Octave/Matlab syntax highlighting Oct 2, 2017
pascal.yaml Add skip statements to all strings Mar 29, 2017
patch.yaml Add converted syntax files Mar 21, 2017
peg.yaml Add converted syntax files Mar 21, 2017
perl.yaml Perl syntax highlighting fix (#818) Sep 24, 2017
perl6.yaml Add other Perl6 extensions Apr 11, 2017
php.yaml Fix php syntax file Jun 4, 2018
pkg-config.yaml Add converted syntax files Mar 21, 2017
po.yaml Add converted syntax files Mar 21, 2017
pony.yaml Add converted syntax files Mar 21, 2017
pov.yaml Add converted syntax files Mar 21, 2017
privoxy-action.yaml Add converted syntax files Mar 21, 2017
privoxy-config.yaml Add converted syntax files Mar 21, 2017
privoxy-filter.yaml Add converted syntax files Mar 21, 2017
puppet.yaml Add converted syntax files Mar 21, 2017
python2.yaml Merge pull request #1205 from kylebarron/python-syntax-fixes Dec 10, 2018
python3.yaml Merge pull request #1205 from kylebarron/python-syntax-fixes Dec 10, 2018
r.yaml Improved R syntax rules Apr 15, 2017
reST.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
rpmspec.yaml Add converted syntax files Mar 21, 2017
ruby.yaml Add converted syntax files Mar 21, 2017
rust.yaml Add skip statements to all strings Mar 29, 2017
scala.yaml a couple more keywords to scala syntax Oct 4, 2017
sed.yaml Add converted syntax files Mar 21, 2017
sh.yaml Update sh.yaml Sep 2, 2018
sls.yaml Add converted syntax files Mar 21, 2017
solidity.yaml Use type.keyword instead of keyword Sep 13, 2017
sql.yaml Add converted syntax files Mar 21, 2017
stata.yaml Add Stata syntax file Oct 2, 2018
swift.yaml Added kotlin highlighting and fixed swift line comment todo not highl… May 26, 2017
syntax_checker.go make syntax_checker work with error messages Aug 6, 2017
syntax_converter.go Fix windows errors Jan 5, 2018
systemd.yaml Add [Timer] section to systemd highlighting Sep 29, 2018
tcl.yaml Fixes #1249 Dec 21, 2018
tex.yaml Update tex syntax file Jan 29, 2018
toml.yaml Add skip statements to all strings Mar 29, 2017
twig.yaml Add twig syntax (https://twig.sensiolabs.org/) Jun 30, 2017
typescript.yaml Add skip statements to all strings Mar 29, 2017
vala.yaml improved highlighting for Vala types Jul 11, 2017
vhdl.yaml Add converted syntax files Mar 21, 2017
vi.yaml Add skip statements to all strings Mar 29, 2017
xml.yaml Improve new syntax files and fix a region glitch Mar 21, 2017
xresources.yaml Correct the comment from # to ! as point out in the gitter chat. Jun 10, 2017
yaml.yaml Allow more ways to write booleans in YAML Nov 22, 2018
yum.yaml Add converted syntax files Mar 21, 2017
zsh.yaml Add skip statements to all strings Mar 29, 2017

README.md

Syntax Files

Here are micro's syntax files.

Each yaml file specifies how to detect the filetype based on file extension or headers (first line of the file). Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype.

Making your own syntax files is very simple. I recommend you check the file after you are finished with the syntax_checker.go program (located in this directory). Just place your yaml syntax file in the current directory and run go run syntax_checker.go and it will check every file. If there are no errors it will print No issues!.

You can read more about how to write syntax files (and colorschemes) in the colors documentation.

Legacy '.micro' filetype

Micro used to use the .micro filetype for syntax files which is no longer supported. If you have .micro syntax files that you would like to convert to the new filetype, you can use the syntax_converter.go program (also located in this directory):

$ go run syntax_converter.go c.micro > c.yaml

Most the the syntax files here have been converted using that tool.

Note that the tool isn't perfect and though it is unlikely, you may run into some small issues that you will have to fix manually (about 4 files from this directory had issues after being converted).

Micro syntax highlighting files

These are the syntax highlighting files for micro. To install them, just put all the syntax files in ~/.config/micro/syntax.

They are taken from Nano, specifically from this repository. Micro syntax files are almost identical to Nano's, except for some key differences:

  • Micro does not use icolor. Instead, for a case insensitive match, use the case insensitive flag (i) in the regular expression
    • For example, icolor green ".*" would become color green "(?i).*"

Using with colorschemes

Not all of these files have been converted to use micro's colorscheme feature. Most of them just hardcode the colors, which can be problematic depending on the colorscheme you use.

Here is a list of the files that have been converted to properly use colorschemes:

  • vi
  • go
  • c
  • d
  • markdown
  • html
  • lua
  • swift
  • rust
  • java
  • javascript
  • pascal
  • python
  • ruby
  • sh
  • git
  • tex
  • solidity

License

Because the nano syntax files I have modified are distributed under the GNU GPLv3 license, these files are also distributed under that license. See LICENSE.

You can’t perform that action at this time.