All Projects → rhysd → Vim Gfm Syntax

rhysd / Vim Gfm Syntax

Licence: mit
GitHub Flavored Markdown syntax highlight extension for Vim

Projects that are alternatives of or similar to Vim Gfm Syntax

Sonar Cnes Report
Generates analysis reports from SonarQube web API.
Stars: ✭ 145 (+59.34%)
Mutual labels:  markdown, plugin
Flow Netbeans Markdown
Markdown file support for the NetBeans IDE
Stars: ✭ 276 (+203.3%)
Mutual labels:  markdown, plugin
Honkit
📖 HonKit is building beautiful books using Markdown - Fork of GitBook
Stars: ✭ 1,901 (+1989.01%)
Mutual labels:  markdown, plugin
Vimpyter
Edit your Jupyter notebooks in Vim/Neovim
Stars: ✭ 308 (+238.46%)
Mutual labels:  markdown, plugin
Showdown Htmlescape
Plugin for Showdown to prevent the use of arbitrary HTML and allow only the specific Markdown syntax.
Stars: ✭ 6 (-93.41%)
Mutual labels:  markdown, plugin
Docsify Tabs
A docsify.js plugin for rendering tabbed content from markdown
Stars: ✭ 65 (-28.57%)
Mutual labels:  markdown, plugin
Sublimetext Markdown Preview
markdown preview and build plugin for sublime text 2/3
Stars: ✭ 2,337 (+2468.13%)
Mutual labels:  markdown, plugin
Editormd
Markdown 编辑器 Editor.md for Typecho
Stars: ✭ 389 (+327.47%)
Mutual labels:  markdown, plugin
Markdown Preview.vim
⚠️ PLEASE USE https://github.com/iamcco/markdown-preview.nvim INSTEAD
Stars: ✭ 764 (+739.56%)
Mutual labels:  markdown, plugin
Marked
Confluence macro plugin which renders remote Markdown.
Stars: ✭ 42 (-53.85%)
Mutual labels:  markdown, plugin
Godot Engine.file Editor
A Godot Engine addon that adds a File Editor for multiple file types editing. Create and Write plain text files, configuration files and csv files with custom visualizers and previews. Also supports file translations!
Stars: ✭ 70 (-23.08%)
Mutual labels:  markdown, plugin
Wordpress Seo
Yoast SEO for WordPress
Stars: ✭ 1,301 (+1329.67%)
Mutual labels:  plugin
Bitsofbytes
Code and projects from my blog posts.
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Facebookclientplugin
Facebook Client Plugin for Xamarin iOS and Android
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Trackmd
Tools for tracking changes in Markdown format within RStudio
Stars: ✭ 89 (-2.2%)
Mutual labels:  markdown
Filebrowser
📂 Web File Browser
Stars: ✭ 13,854 (+15124.18%)
Mutual labels:  plugin
Html To Markdown
Convert HTML to Markdown with PHP
Stars: ✭ 1,293 (+1320.88%)
Mutual labels:  markdown
Entityframeworkcore.dataencryption
A plugin for Microsoft.EntityFrameworkCore to add support of encrypted fields using built-in or custom encryption providers.
Stars: ✭ 88 (-3.3%)
Mutual labels:  plugin
Vueno
Vue Conversion Plugin
Stars: ✭ 89 (-2.2%)
Mutual labels:  plugin
Gluedown
Wrap R vectors in markdown syntax
Stars: ✭ 88 (-3.3%)
Mutual labels:  markdown

GitHub Flavored Markdown Syntax Extension for Vim

Build Status

This Vim plugin provides extra syntax highlight for GitHub Flavored Markdown. GitHub adds their extra features to Markdown. This plugin fills the gap between normal Markdown and GitHub Flavored Markdown.

Supports for below syntax are added:

Name Example
Inline code code
Mentions @rhysd
Issue number #123
Emoji 🐶
Check box - [x]
Table This!

And it also supports concealing emoji characters.

Screenshot

Before After
before after

Usage

By default, this plugin is enabled for all markdown filetype files.

If you want to enable these extra syntax highlights in specific file, you can use g:gfm_syntax_enable_filetypes and sub filetypes.

Example: Only README.md enables extra highlight.

let g:gfm_syntax_enable_always = 0
let g:gfm_syntax_enable_filetypes = ['markdown.gfm']
autocmd BufRead,BufNew,BufNewFile README.md setlocal ft=markdown.gfm

If you want to highlight inner code block, standard syntax highlight support for Markdown already supports it.

let g:markdown_fenced_languages = ['cpp', 'ruby', 'json']

In above Example, C++, Ruby and JSON code blocks will be highlighted with their syntax highlight. Please note that enabling so many filetypes for code block may cause performance issue on highlighting.

If you want to support specific feature of GFM, you can control them to be highlighted by some variables.

Variable Description
g:gfm_syntax_highlight_inline_code If 0, inline codes won't be highlighted.
g:gfm_syntax_highlight_mention If 0, mentions won't be highlighted.
g:gfm_syntax_highlight_strikethrough If 0, strikethrough won't be highlighted.
g:gfm_syntax_highlight_emoji If 0, emojis won't be highlighted.
g:gfm_syntax_highlight_table If 0, tables won't be highlighted.
g:gfm_syntax_highlight_issue_number If 0, issue number won't be highlighted
g:gfm_syntax_highlight_checkbox If 0, check box won't be highlighted

If you want to use your favorite colors for syntax highlights, you can override highlight definitions. Below configration is an example where inline code will be highlighted with CursorLine highlight.

autocmd ColorScheme * highlight link githubFlavoredMarkdownCode CursorLine

githubFlavoredMarkdownCode is a highlight rule for inline code. For other rules, please see after/syntax/markdown/gfm.vim. There are so many colorschemes for Vim. One syntax file can't consider all of them. If you feel some highlighting is not good, please customize by yourself.

Note: Standard markdown syntax highlight offers markdownCode to highlight inline codes, but they also highlight code blocks. githubFlavoredMarkdownCode only highlights inline codes.

Emoji Concealing

screenshot

This plugin also supports concealing emojis using Vim's 'conceal' feature. When g:gfm_syntax_emoji_conceal is set to 1, emojis such as 🐶 in will be displayed as real emoji like 🐶. Original text (🐶) remains as is. Concealing happens only in non-current lines.

What is the Difference from vim-flavored-markdown?

vim-flavored-markdown was created for the same purpose as this plugin, and it works well. But it does not match to my usecase in terms of below points.

  • vim-flavored-markdown introduces new filetype ghmarkdown. This is useful if you want to distinguish Markdown and GFM. Otherwise, it kills original markdown filetype. It means that many other plugins for markdown filetype are killed as well.
  • Because vim-flavored-markdown is a fork of old version of vim-markdown, it lacks some improvements (e.g. code block highlight).
  • vim-gfm-syntax supports more GFM syntax (e.g. checkbox), well-tested (with themis.vim), customizable (you can choose which syntax should be highlighted).

License

This plugin is distributed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].