Add console filetype for Markdown/RST code blocks

This commit is contained in:
Kenneth Benzie 2020-01-28 10:47:51 +00:00
parent 489e6db231
commit a93489efe9
2 changed files with 14 additions and 3 deletions

8
syntax/console.vim Normal file
View File

@ -0,0 +1,8 @@
if exists('b:current_syntax')
finish
endif
syntax region consoleCommand matchgroup=consolePrompt start='^\s*\$' skip='\\$' end='$'
highlight link consoleCommand Special
highlight consolePrompt cterm=bold gui=bold

9
vimrc
View File

@ -167,11 +167,14 @@ let g:DoxygenToolkit_commentType = 'C++'
" markdown fenced code block languages
let g:markdown_fenced_languages =
\ ['cpp', 'c', 'cmake', 'sh', 'vim', 'python', 'yaml']
\ ['cpp', 'c', 'cmake', 'console', 'sh', 'vim', 'python', 'yaml']
" reStructuredText code block languages
let g:rst_syntax_code_list = {
\ 'vim': ['vim'], 'java': ['java'],
\ 'c': ['c'], 'cpp': ['cpp', 'c++'],
\ 'vim': ['vim'],
\ 'java': ['java'],
\ 'c': ['c'],
\ 'cpp': ['cpp', 'c++'],
\ 'console': ['console'],
\ 'python': ['python']
\ }