Procházet zdrojové kódy

Tweak vim-pandoc settings, add slide creation

We make Goyo play nice with vim-pandoc's foldcolumn, default to odt
files (working on getting a good odt reference template). The `A`
formatting option is removed for better performance on larger paragraphs
in long documents (instead, we need to format it ourselves with `gqip`
or run ':FormatPandoc'). Side scrolloff is lowered to stop vim from
jumping left and right lots when terminal is fullscreen
e.g. when using it side by side with another window.
cinaeco před 6 roky
rodič
revize
6bae571da2

+ 6 - 3
vim/settings/goyo-limelight.vim

@@ -1,5 +1,8 @@
 " Limelight paragraph highlighting integration.
 " Limelight paragraph highlighting integration.
-autocmd User GoyoEnter Limelight | setlocal wrap nocursorline
-autocmd User GoyoLeave Limelight!
+"autocmd User GoyoEnter Limelight | setlocal wrap nocursorline
+"autocmd User GoyoLeave Limelight!
 
 
-let g:limelight_conceal_ctermfg = 240
+let g:goyo_width = 81
+let g:goyo_height = '100%'
+
+"let g:limelight_conceal_ctermfg = 240

+ 5 - 1
vim/settings/pandoc.vim

@@ -9,7 +9,7 @@ let g:pandoc#filetypes#pandoc_markdown = 0
 let g:pandoc#syntax#conceal#use = 0
 let g:pandoc#syntax#conceal#use = 0
 
 
 " Hard-wrap lines to 80 characters, except for headers and code blocks.
 " Hard-wrap lines to 80 characters, except for headers and code blocks.
-let g:pandoc#formatting#mode = 'hA'
+let g:pandoc#formatting#mode = 'h'
 let g:pandoc#formatting#textwidth = 80
 let g:pandoc#formatting#textwidth = 80
 
 
 " Write `docx` versions of `pandoc` files on save.
 " Write `docx` versions of `pandoc` files on save.
@@ -21,3 +21,7 @@ map <leader>z 1z=
 
 
 " Omni-complete from bibliographic sources e.g. bibtex. Citekeys start with '@'.
 " Omni-complete from bibliographic sources e.g. bibtex. Citekeys start with '@'.
 autocmd FileType pandoc let b:vcm_omni_pattern = '@'
 autocmd FileType pandoc let b:vcm_omni_pattern = '@'
+
+" Create revealjs slides from pandoc_slides files.
+autocmd BufRead,BufNewFile *.pandoc_slides set filetype=pandoc
+     \| let b:pandoc_command_autoexec_command = "Pandoc revealjs"

+ 3 - 0
vim/settings/templates.vim

@@ -9,3 +9,6 @@ autocmd BufNewFile [Mm]akefile silent 0r ~/dotfiles/vim/templates/makefile | sil
 
 
 " Template for pandoc files.
 " Template for pandoc files.
 autocmd BufNewFile *.pandoc silent 0r ~/dotfiles/vim/templates/pandoc | silent 0,$ g/^"/d | normal 2G$
 autocmd BufNewFile *.pandoc silent 0r ~/dotfiles/vim/templates/pandoc | silent 0,$ g/^"/d | normal 2G$
+
+" Template for pandoc silde files.
+autocmd BufNewFile *.pandoc_slides silent 0r ~/dotfiles/vim/templates/pandoc_slides | silent 0,$ g/^"/d | normal 2G$

+ 1 - 0
vim/templates/pandoc

@@ -11,6 +11,7 @@ abstract: |
 # Bibliography
 # Bibliography
 
 
 ---
 ---
+suppress-bibliography: false
 " Record uncited references that should still appear in the bibliography here.
 " Record uncited references that should still appear in the bibliography here.
 nocite: |
 nocite: |
 
 

+ 22 - 0
vim/templates/pandoc_slides

@@ -0,0 +1,22 @@
+---
+title: Example
+author: Author Name
+date: 1 January 2000
+---
+
+# Introduction
+
+## Page 1
+
+- Item 1
+- Item 2
+
+## Page 2
+
+- Item 3
+
+---
+" Record uncited references that should still appear in the bibliography here.
+nocite: |
+
+---

+ 1 - 1
vim/vimrc

@@ -103,7 +103,7 @@ set scrolloff=5                         " Lines to keep above/below cursor
 set shortmess+=filmnrxoOtT              " Abbreviation of messages
 set shortmess+=filmnrxoOtT              " Abbreviation of messages
 set showmatch                           " Show matching brackets/parenthesis
 set showmatch                           " Show matching brackets/parenthesis
 set sidescroll=1                        " Side-ways scroll speed
 set sidescroll=1                        " Side-ways scroll speed
-set sidescrolloff=10                    " Columns to keep left/right of cursor
+set sidescrolloff=1                     " Columns to keep left/right of cursor
 set wildmenu                            " Ex command tab-complete shows options
 set wildmenu                            " Ex command tab-complete shows options
 if has('syntax')
 if has('syntax')
   syntax enable                         " Syntax highlighting
   syntax enable                         " Syntax highlighting