plugins: Gutentags only for some filetypes
[vimconf.git] / plugins-noroot.vim
index e2e97b68e4d867993f966b118205818572561539..f88134f6a96e81580aba0dd33a2b8a39f834cbe8 100644 (file)
@@ -1,6 +1,7 @@
 Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'}
 
-Plug 'ludovicchabant/vim-gutentags', {'for': ['c', 'cpp', 'objc']}
+" Conditional loading does not work, see github issue #823
+Plug 'ludovicchabant/vim-gutentags'
 "Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']}
 
 Plug 'editorconfig/editorconfig-vim'
@@ -26,6 +27,26 @@ Plug 'mattn/calendar-vim'
 
 Plug 'vim-scripts/loremipsum', {'on': 'Loremipsum'}
 
-if g:lowendbox == 0
-    source ~/.vim/plugins-noroot-nolowendbox.vim
-endif
+
+function PluginsNorootConfig()
+    let g:localvimrc_persistent = 1
+
+    let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
+
+    "augroup pencil
+      "au!
+      "au FileType markdown,mkd call pencil#init()
+      "au FileType text         call pencil#init()
+      "au FileType mail         call pencil#init()
+      "au FileType tex          call pencil#init()
+    "augroup END
+
+    let g:vim_markdown_frontmatter=1
+    let g:vim_markdown_math=1
+
+    au FileType markdown call RagtagInit()
+
+    " Generally disable gutentags, but enable for some filetypes
+    let g:gutentags_enabled = 0
+    au FileType c,cpp,objc,tex let g:gutentags_enabled = 1
+endfunction