ragtag: Enable ragtag for markdown, disable <C-_>
authorStefan Huber <shuber@sthu.org>
Sat, 29 Dec 2018 11:13:55 +0000 (12:13 +0100)
committerStefan Huber <shuber@sthu.org>
Sat, 29 Dec 2018 11:13:55 +0000 (12:13 +0100)
Ragtag initializes only for certain file types so disable lazy load of
ragtag by vim-plug. Since markdown is not in this list explicitly call
RagtagInit().

Also disable the old <C-_> shortcut and use ragtag's <C-X>/ instead.

init.vim
keymaps.vim
plugins.vim

index 0626ee4125c336b24f47f14d971836aed37e9cc2..2d63a7d4b161394817dbd36b194dbd1052f70888 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -78,6 +78,8 @@ let g:vim_markdown_folding_disabled=1
 let g:vim_markdown_frontmatter=1
 let g:vim_markdown_math=1
 
 let g:vim_markdown_frontmatter=1
 let g:vim_markdown_math=1
 
+au FileType markdown call RagtagInit()
+
 let g:guesslang_langs=[ 'en_US', 'de_AT']
 au FileType text,markdown,mail,tex,gitcommit,mediawiki setlocal spell
 au BufReadPost * :DetectIndent
 let g:guesslang_langs=[ 'en_US', 'de_AT']
 au FileType text,markdown,mail,tex,gitcommit,mediawiki setlocal spell
 au BufReadPost * :DetectIndent
index 4b273558e2d4e0aa6cdb87e076ff2348cb46f01b..7f04452831005fddea1498ff5134a9c12e8b5fcc 100644 (file)
@@ -21,7 +21,6 @@ au Filetype c,cpp,objc map <buffer> <F11> :vsplit<CR>:FSRight<CR>
 au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
 au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
 
 au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
 au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
 
-au Filetype html,xml imap <buffer> <C-_> <C-X>/
 au Filetype markdown map <buffer> <F5> :call RunPandoc()<CR>
 
 " Start interactive EasyAlign in visual mode (e.g. vipga)
 au Filetype markdown map <buffer> <F5> :call RunPandoc()<CR>
 
 " Start interactive EasyAlign in visual mode (e.g. vipga)
index 988dcd617bcca0065bdb0ca0a65cb828b09a5e2f..ead7f513a1b00f6d8f6438a3686ba9b60b65a0e1 100644 (file)
@@ -28,7 +28,7 @@ Plug 'cakebaker/scss-syntax.vim', {'for': 'scss'}
 Plug 'hail2u/vim-css3-syntax', {'for': ['scss', 'css']}
 Plug 'ap/vim-css-color', {'for': ['scss', 'css']}
 
 Plug 'hail2u/vim-css3-syntax', {'for': ['scss', 'css']}
 Plug 'ap/vim-css-color', {'for': ['scss', 'css']}
 
-Plug 'tpope/vim-ragtag', {'for': ['html', 'xml']}
+Plug 'tpope/vim-ragtag'
 
 Plug 'lervag/vimtex', {'for': 'tex'}
 
 
 Plug 'lervag/vimtex', {'for': 'tex'}