Browse Source

added template

Christian Chiarulli 6 years ago
parent
commit
ac7ef483d4
4 changed files with 75 additions and 3 deletions
  1. 0 1
      init.vim
  2. 0 1
      modules/gutentags.vim
  3. 71 0
      modules/markdown-preview.vim
  4. 4 1
      modules/plugins.vim

+ 0 - 1
init.vim

@@ -7,4 +7,3 @@ source $HOME/.config/nvim/modules/airline.vim
 source $HOME/.config/nvim/modules/deoplete.vim
 source $HOME/.config/nvim/modules/nerdtree.vim
 source $HOME/.config/nvim/modules/startify.vim
-source $HOME/.config/nvim/modules/gutentags.vim

+ 0 - 1
modules/gutentags.vim

@@ -1 +0,0 @@
-set nofsync

+ 71 - 0
modules/markdown-preview.vim

@@ -0,0 +1,71 @@
+" set to 1, the nvim will open the preview window once enter the markdown buffer
+" default: 0
+let g:mkdp_auto_start = 1
+
+" set to 1, the nvim will auto close current preview window when change
+" from markdown buffer to another buffer
+" default: 1
+let g:mkdp_auto_close = 1
+
+" set to 1, the vim will just refresh markdown when save the buffer or
+" leave from insert mode, default 0 is auto refresh markdown as you edit or
+" move the cursor
+" default: 0
+let g:mkdp_refresh_slow = 0
+
+" set to 1, the MarkdownPreview command can be use for all files,
+" by default it just can be use in markdown file
+" default: 0
+let g:mkdp_command_for_global = 1
+
+" set to 1, preview server available to others in your network
+" by default, the server only listens on localhost (127.0.0.1)
+" default: 0
+let g:mkdp_open_to_the_world = 1
+
+" use custom IP to open preview page
+" useful when you work in remote vim and preview on local browser
+" more detail see: https://github.com/iamcco/markdown-preview.nvim/pull/9
+" default empty
+let g:mkdp_open_ip = ''
+
+" specify browser to open preview page
+" default: ''
+let g:mkdp_browser = ''
+
+" set to 1, echo preview page url in command line when open preview page
+" default is 0
+let g:mkdp_echo_preview_url = 0
+
+" a custom vim function name to open preview page
+" this function will receive url as param
+" default is empty
+let g:mkdp_browserfunc = ''
+
+" options for markdown render
+" mkit: markdown-it options for render
+" katex: katex options for math
+" uml: markdown-it-plantuml options
+" maid: mermaid options
+" disable_sync_scroll: if disable sync scroll, default 0
+" sync_scroll_type: 'middle', 'top' or 'relative', default value is 'middle'
+"   middle: mean the cursor position alway show at the middle of the preview page
+"   top: mean the vim top viewport alway show at the top of the preview page
+"   relative: mean the cursor position alway show at the relative positon of the preview page
+let g:mkdp_preview_options = {
+    \ 'mkit': {},
+    \ 'katex': {},
+    \ 'uml': {},
+    \ 'maid': {},
+    \ 'disable_sync_scroll': 0,
+    \ 'sync_scroll_type': 'middle'
+    \ }
+
+" use a custom markdown style must be absolute path
+let g:mkdp_markdown_css = ''
+
+" use a custom highlight style must absolute path
+let g:mkdp_highlight_css = ''
+
+" use a custom port to start server or random for empty
+let g:mkdp_port = ''

+ 4 - 1
modules/plugins.vim

@@ -19,7 +19,7 @@ if dein#load_state('~/.config/nvim/dein')
   " Start Screen
   call dein#add('mhinz/vim-startify')
   " For ctags
-  call dein#add('ludovicchabant/vim-gutentags')
+  ""call dein#add('ludovicchabant/vim-gutentags')
   " Tagbar
   call dein#add('majutsushi/tagbar')
   " Auto Pairs
@@ -35,6 +35,9 @@ if dein#load_state('~/.config/nvim/dein')
   call dein#add('tpope/vim-fugitive')
   " BufOnly use :BufOnly to unload all or pass it a single buffer
   call dein#add('vim-scripts/BufOnly.vim')
+  " Markdown viewer
+  "
+  call dein#add('iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install'  })
 
   call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
   call dein#add('Shougo/deoplete.nvim')