]> git.zndr.dk Git - vimfiles.git/commitdiff
Add markdown preview
authorU-EMEA\59698 <59698@N104828.emea.group.grundfos.com>
Wed, 8 Aug 2018 07:34:40 +0000 (09:34 +0200)
committerU-EMEA\59698 <59698@N104828.emea.group.grundfos.com>
Wed, 8 Aug 2018 07:34:40 +0000 (09:34 +0200)
14 files changed:
.gitmodules
pack/markdown/opt/vim-javascript [new submodule]
pack/markdown/opt/vim-pandoc [new submodule]
pack/markdown/opt/vim-pandoc-syntax [new submodule]
pack/markdown/opt/vim-syntax-extra [new submodule]
pack/markdown/start/open-browser.vim [new submodule]
pack/markdown/start/previm [new submodule]
pack/markdown/start/vim-markdown [new submodule]
pack/standard/opt/vim-javascript [deleted submodule]
pack/standard/opt/vim-pandoc [deleted submodule]
pack/standard/opt/vim-pandoc-syntax [deleted submodule]
pack/standard/opt/vim-syntax-extra [deleted submodule]
pack/standard/start/bclose.vim [deleted submodule]
vimrc

index eeb62fa677767212fe84f0385d9a9efab6e1b317..87d2d483589b75838f235edddd27e36c3d119b39 100644 (file)
        path = pack/async/opt/ale\r
        url = https://github.com/w0rp/ale.git\r
 [submodule "pack/markdown/opt/vim-javascript"]\r
-       path = pack/standard/opt/vim-javascript
+       path = pack/markdown/opt/vim-javascript
        url = https://github.com/pangloss/vim-javascript\r
 [submodule "pack/markdown/opt/vim-pandoc"]\r
-       path = pack/standard/opt/vim-pandoc
+       path = pack/markdown/opt/vim-pandoc
        url = https://github.com/vim-pandoc/vim-pandoc.git\r
 [submodule "pack/markdown/opt/vim-pandoc-syntax"]\r
-       path = pack/standard/opt/vim-pandoc-syntax
+       path = pack/markdown/opt/vim-pandoc-syntax
        url = https://github.com/vim-pandoc/vim-pandoc-syntax.git\r
 [submodule "pack/async/opt/completor.vim"]\r
        path = pack/async/opt/completor.vim\r
@@ -62,7 +62,7 @@
        path = pack/async/opt/validator.vim\r
        url = https://github.com/maralla/validator.vim.git\r
 [submodule "pack/syntax/opt/vim-syntax-extra"]\r
-       path = pack/standard/opt/vim-syntax-extra
+       path = pack/markdown/opt/vim-syntax-extra
        url = https://github.com/justinmk/vim-syntax-extra.git\r
 [submodule "pack/github/opt/supertab"]\r
        path = pack/github/opt/supertab\r
 [submodule "pack/async/start/gen_tags.vim"]
        path = pack/async/opt/gen_tags.vim
        url = https://github.com/jsfaint/gen_tags.vim.git
-[submodule "pack/standard/start/bclose.vim"]
-       path = pack/standard/start/bclose.vim
-       url = https://github.com/rbgrouleff/bclose.vim.git
 [submodule "pack/tpope/start/vim-vinegar"]
        path = pack/tpope/start/vim-vinegar
        url = https://github.com/manasthakur/vim-vinegar.git
+[submodule "pack/markdown/opt/previm"]
+       path = pack/markdown/start/previm
+       url = https://github.com/previm/previm.git
+[submodule "pack/markdown/start/open-browser.vim"]
+       path = pack/markdown/start/open-browser.vim
+       url = https://github.com/tyru/open-browser.vim.git
+[submodule "pack/markdown/start/vim-markdown"]
+       path = pack/markdown/start/vim-markdown
+       url = https://github.com/plasticboy/vim-markdown.git
diff --git a/pack/markdown/opt/vim-javascript b/pack/markdown/opt/vim-javascript
new file mode 160000 (submodule)
index 0000000..39e332a
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 39e332a3c36c0115e1eab85c34cf121b7585869d
diff --git a/pack/markdown/opt/vim-pandoc b/pack/markdown/opt/vim-pandoc
new file mode 160000 (submodule)
index 0000000..0060e5c
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 0060e5c6ac9e4a2391e8a36359dcbbb5827978cb
diff --git a/pack/markdown/opt/vim-pandoc-syntax b/pack/markdown/opt/vim-pandoc-syntax
new file mode 160000 (submodule)
index 0000000..56e8e41
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 56e8e41ef863a0a7d33d85c3c0c895aa6e9e62d3
diff --git a/pack/markdown/opt/vim-syntax-extra b/pack/markdown/opt/vim-syntax-extra
new file mode 160000 (submodule)
index 0000000..2290b72
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 2290b72ba48c808d741db300110944a484b8ee9c
diff --git a/pack/markdown/start/open-browser.vim b/pack/markdown/start/open-browser.vim
new file mode 160000 (submodule)
index 0000000..de4eeb0
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit de4eeb085051e9b56dd5574eba7c7e72feb21246
diff --git a/pack/markdown/start/previm b/pack/markdown/start/previm
new file mode 160000 (submodule)
index 0000000..6ab010b
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 6ab010bd5a76afcd3772559bc78e76edcd0107d0
diff --git a/pack/markdown/start/vim-markdown b/pack/markdown/start/vim-markdown
new file mode 160000 (submodule)
index 0000000..f19506b
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit f19506b1bfe5e60c39581dd53f6913a09385f5dd
diff --git a/pack/standard/opt/vim-javascript b/pack/standard/opt/vim-javascript
deleted file mode 160000 (submodule)
index 39e332a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 39e332a3c36c0115e1eab85c34cf121b7585869d
diff --git a/pack/standard/opt/vim-pandoc b/pack/standard/opt/vim-pandoc
deleted file mode 160000 (submodule)
index 0060e5c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0060e5c6ac9e4a2391e8a36359dcbbb5827978cb
diff --git a/pack/standard/opt/vim-pandoc-syntax b/pack/standard/opt/vim-pandoc-syntax
deleted file mode 160000 (submodule)
index 56e8e41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 56e8e41ef863a0a7d33d85c3c0c895aa6e9e62d3
diff --git a/pack/standard/opt/vim-syntax-extra b/pack/standard/opt/vim-syntax-extra
deleted file mode 160000 (submodule)
index 2290b72..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2290b72ba48c808d741db300110944a484b8ee9c
diff --git a/pack/standard/start/bclose.vim b/pack/standard/start/bclose.vim
deleted file mode 160000 (submodule)
index dd55ebc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit dd55ebc4097d40b0335f3be15656d31b8fa250ef
diff --git a/vimrc b/vimrc
index 1f5d6d33ab026301c2ff64c70d52525d8c7777b3..3e2222bc4a121787a64e3d8385b769879d6a3190 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -194,9 +194,15 @@ function! s:Iar()
 endfunction
 command! -bang -nargs=0 -complete=file Iar call s:Iar(<f-args>)
 
+function! Markdown_Preview()
+  let b:curr_file = expand('%:p')
+  call system('pandoc --standalone "' . b:curr_file . '" > markdown-preview.html')
+  call system('firefox markdown-preview.html 1>/dev/null 2>/dev/null &')
+endfunction
+
 " Autocommands
 if has('autocmd')
-  augroup expandtabs
+  augroup tabstospaces 
   autocmd!
   autocmd FileType c      setlocal expandtab softtabstop=2 shiftwidth=2
   autocmd FileType cpp    setlocal expandtab softtabstop=2 shiftwidth=2
@@ -209,21 +215,21 @@ if has('autocmd')
 
   augroup filetypes 
   autocmd!
-  autocmd bufnewfile,bufread *.md        set filetype=pandoc
-  autocmd bufnewfile,bufread *.gradle    set filetype=groovy
-  autocmd bufnewfile,bufread *.json      set filetype=json
-  autocmd bufnewfile,bufread *.yml       set filetype=yaml
+  autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} set filetype=markdown
+  autocmd BufNewfile,BufRead *.gradle                   set filetype=groovy
+  autocmd BufNewfile,BufRead *.json                     set filetype=json
+  autocmd BufNewfile,BufRead *.yml                      set filetype=yaml
   augroup end
   
   augroup saveall
   autocmd!
-  autocmd focuslost * silent! wa
+  autocmd FocusLost * silent! wa
   augroup end
 
   augroup numbers
   autocmd!
-  autocmd bufenter,focusgained,insertleave * set relativenumber
-  autocmd bufleave,focuslost,insertenter   * set norelativenumber
+  autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
+  autocmd BufLeave,FocusLost,InsertEnter   * set norelativenumber
   augroup end
 
   augroup vimrc
@@ -309,21 +315,18 @@ packadd supertab
 "let g:validator_c_checkers = ['clang-tidy']
 "let g:validator_cpp_checkers = ['clang-tidy']
 
-" Pandoc
-packadd vim-pandoc
-packadd vim-pandoc-syntax
-function! Markdown_Preview()
-  let b:curr_file = expand('%:p')
-  call system('pandoc --standalone "' . b:curr_file . '" > markdown-preview.html')
-  call system('firefox markdown-preview.html 1>/dev/null 2>/dev/null &')
-endfunction
-nnoremap <Leader>md :call Markdown_Preview()<CR>
+" markdown 
+"packadd vim-pandoc
+"packadd vim-pandoc-syntax
+packadd vim-markdown
+"nnoremap <Leader>md :call Markdown_Preview()<CR>
+nnoremap <Leader>md :PrevimOpen<cr>
 
 " Pick
 packadd pick.vim
-nnoremap <Leader>p :call PickFile()<CR>
-nnoremap <Leader>b :call PickBuffer()<CR>
-nnoremap <Leader>] :call PickTag()<CR>
+nnoremap <Leader>pf :call PickFile()<CR>
+nnoremap <Leader>pb :call PickBuffer()<CR>
+nnoremap <Leader>pt :call PickTag()<CR>
 let g:pick_height = 10
 
 " javascript