From a93489efe946caec0e7baeb64a5a02f79d05437e Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" <benie@infektor.net> Date: Tue, 28 Jan 2020 10:47:51 +0000 Subject: [PATCH] Add console filetype for Markdown/RST code blocks --- syntax/console.vim | 8 ++++++++ vimrc | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 syntax/console.vim diff --git a/syntax/console.vim b/syntax/console.vim new file mode 100644 index 0000000..1308c93 --- /dev/null +++ b/syntax/console.vim @@ -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 diff --git a/vimrc b/vimrc index 08f1f92..e397a82 100644 --- a/vimrc +++ b/vimrc @@ -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'] \ }