pandoc.txt 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. *pandoc.txt* Pandoc integration and utilities
  2. Vim-pandoc provides facilities to integrate Vim with the |pandoc| document
  3. converter and work with documents written in |pandoc's-markdown-variant|
  4. variant (although textile documents are also supported). It is the main item
  5. in |vim-pandoc-project|.
  6. - *pandoc*:
  7. http://johnmacfarlane.net/pandoc/
  8. - *pandoc's-markdown-variant*:
  9. http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
  10. - *vim-pandoc-project*:
  11. http://github.com/vim-pandoc
  12. Vim-pandoc's goals are
  13. 1) to provide advanced integration with pandoc,
  14. 2) to offer a comfortable document writing environment,
  15. 3) to allow great configurability.
  16. CONTENTS *vim-pandoc*
  17. - REQUIREMENTS |vim-pandoc-requirements|
  18. - INSTALLATION |vim-pandoc-installation|
  19. - SYNTAX |vim-pandoc-pandoc-syntax|
  20. - MODULES |vim-pandoc-modules|
  21. - FORMATTING |vim-pandoc-formatting-module|
  22. - FOLDING |vim-pandoc-folding-module|
  23. - COMMAND |vim-pandoc-command-module|
  24. -- TEMPLATES |vim-pandoc-command-templates|
  25. - MENU |vim-pandoc-menu-module|
  26. - KEYBOARD |vim-pandoc-keyboard-module|
  27. - BIBLIOGRAPHIES |vim-pandoc-bibliographies-module|
  28. - COMPLETION |vim-pandoc-completion-module|
  29. -- AUTOCOMPLETE |vim-pandoc-complete-auto|
  30. -- DEOPLETE |vim-pandoc-complete-deoplete|
  31. -- NEOCOMPLETE |vim-pandoc-complete-neocomplete|
  32. -- NCM2 |vim-pandoc-complete-ncm2|
  33. -- NVIM-COMPLETION-MANAGER |vim-pandoc-complete-ncm|
  34. -- YOUCOMPLETEME |vim-pandoc-complete-youcompleteme|
  35. -- VIMCOMPLETESME |vim-pandoc-complete-vcm|
  36. - TOC |vim-pandoc-toc-module|
  37. - SPELL |vim-pandoc-spell-module|
  38. - HYPERTEXT |vim-pandoc-hypertext-module|
  39. - CONFIGURATION
  40. - SETTINGS |vim-pandoc-settings|
  41. REQUIREMENTS *vim-pandoc-requirements*
  42. * Vim 7.4
  43. Note: On vim versions < 7.4, some modules are automatically disabled (see
  44. |g:pandoc#modules#disabled|, but vim-pandoc is able to run in a degraded
  45. mode.
  46. * python 3 support.
  47. Note: If python is not available, the features that require it are
  48. automatically disabled, allowing vim-pandoc to run in a degraded mode.
  49. However, vim-pandoc uses the new python API, so in versions under 7.4, even
  50. if python is available, some functions might not.
  51. To check if the requirements are satisfied, check if
  52. :echo v:version >= 704 && has("python3")
  53. outputs "1".
  54. The warning message when modules are automatically disabled can be suppressed
  55. by using
  56. >
  57. let g:pandoc#modules#warn_disabled = 0
  58. INSTALLATION *vim-pandoc-installation*
  59. The plugin follows the usual bundle structure, so it's easy to install it
  60. using pathogen, Vundle or NeoBundle.
  61. The most recent version is available at github. For those who need it, a
  62. tarball is available from here.
  63. - Using Vundle (recommended)
  64. Just add
  65. Plugin 'vim-pandoc/vim-pandoc'
  66. to your ~/.vimrc file and run :PluginInstall
  67. NeoBundle users should replace `Plugin` in these instructions with
  68. `NeoBundle`.
  69. - Using Pathogen
  70. $ cd ~/.vim/bundle
  71. $ git clone git@github.com:vim-pandoc/vim-pandoc.git
  72. - The repo is pathogen compatible and you can also just drop it in runtimepath.
  73. SYNTAX *vim-pandoc-pandoc-syntax*
  74. vim-pandoc doesn't provide a syntax file for pandoc markdown files. Please
  75. use https://github.com/vim-pandoc/vim-pandoc-syntax for this:
  76. Plugin 'vim-pandoc/vim-pandoc-syntax'
  77. Note: this syntax file is used for both `markdown` and `pandoc` filetypes by
  78. default, but you can opt out of it for markdown files by setting
  79. |g:pandoc#filetypes#pandoc_markdown| to 0.
  80. The reason we split the syntax file is it is much cleaner to track issues
  81. separatedly. It also allows users not to use this syntax file if they want to
  82. (notice that vim-pandoc-syntax is also configurable).
  83. FILETYPES *vim-pandoc-filetypes*
  84. vim-pandoc is not a regular filetype plugin. Although it does define a
  85. `pandoc` filetype, vim-pandoc can also attach to other filetypes, like
  86. `markdown`, `rst` and `textile`. In that case, vim-pandoc uses the appropriate
  87. filetype syntax file, but creates the Pandoc command and loads the extra
  88. utilities. vim-pandoc also provides a convenience `beamer` filetype, that
  89. simply clones the `pandoc` filetype. The `beamer` filetype is useful for
  90. managing the behavior of |g:pandoc#command#autoexec_command| (see below). What
  91. filetypes to attach to is determined by the value of the
  92. |g:pandoc#filetypes#handled| variable.
  93. Setting `pandoc#filetypes#pandoc_markdown` to 0 will disable all pandoc
  94. functionality for markdown files, unless "pandoc" exists in the
  95. `pandoc#filetypes#handled` array.
  96. To enable pandoc functionality for markdown files while using the markdown
  97. filetype and syntax, use
  98. >
  99. let g:pandoc#filetypes#handled = ["pandoc", "markdown"]
  100. let g:pandoc#filetypes#pandoc_markdown = 0
  101. Note: vim-pandoc's developers mostly use pandoc's markdown syntax, so
  102. coverage for it is more complete than for the other filetypes.
  103. MODULES *vim-pandoc-modules*
  104. vim-pandoc is split in several modules. They can be enabled and disabled
  105. independently at startup, by adjusting the values of the
  106. |g:pandoc#modules#enabled| and |g:pandoc#modules#disabled| variables.
  107. For example, some people prefer not to use folds, so they would want to
  108. disable the `folding` module, which creates folds for headers and some special
  109. cases. To disable the module they should put
  110. let g:pandoc#modules#disabled = ["folding"]
  111. in their .vimrc.
  112. *vim-pandoc-modules-list*
  113. Now, a description of the available modules
  114. - FORMATTING *vim-pandoc-formatting-module*
  115. Handles basic writing settings, like the use of hard or soft line wraps. It is
  116. recommended to leave this module enabled.
  117. The module behavior is configured through the |g:pandoc#formatting#mode|
  118. variable. For example, giving it the value 'ha' will enable hard breaks, and
  119. autoformatting. The default is to use soft wraps. Some key maps are different
  120. in soft and hard wrapping modes, see the info on the KEYBOARD module below.
  121. If you use the hard wraps mode, you could want to adjust the textwidth value.
  122. This can be done through the |g:pandoc#formatting#textwidth| variable, or
  123. setting |textwidth| by hand.
  124. A smart auto-formatting mode is provided, intended to use with the hard
  125. wrapping mode. When enabled, (using the 'A' flag for
  126. |g:pandoc#formatting#mode|), the plugin will be aware of what sort of block
  127. the cursor is in and adjust |formatoptions| accordingly (so, for example,
  128. headers won't be broken when they go beyond |textwidth|, and no autoformatting
  129. will be used within codeblocks). Note this functionality requires the
  130. |vim-pandoc-syntax| plugin to be installed, because it uses highlighting
  131. information to work. By default, this kind of autoformatting is triggered on
  132. entering and leaving insert mode, but it can be triggered when the cursor
  133. moves in insert mode too if desired (it can be cleaner, although it might add
  134. some lag), by setting |g:pandoc#formatting#smart_autoformat_on_cursormoved|.
  135. The user can temporarily disable/enable this autoformatting feature on any
  136. specific buffer by setting the value of *b:pandoc_autoformat_enabled* (which
  137. can be done using the `pandoc#formatting#{Enable,Disable,Toggle}Autoformat()`
  138. functions).
  139. The formatting module also configures the program used for the |=| command,
  140. which you can use to reformat your document (by default: wraps lines, returns
  141. inline links and footnotes into reference links, etc.). This is configured
  142. with the |g:pandoc#formatting#equalprg| and
  143. |g:pandoc#formatting#extra_equalprg| variables. Please note that if you pass a
  144. whole file through the default filter, it might delete some stuff, like LaTeX
  145. macro definitions and title blocks.
  146. - FOLDING *vim-pandoc-folding-module*
  147. Provides folding support for markdown and textile files.
  148. The initial |'foldlevel'| is set with |g:pandoc#folding#level|. By default,
  149. vim-pandoc will enable the |foldcolumn| with a width of 1. This can be
  150. configured with the |g:pandoc#folding#fdc| variable.
  151. As expected, folds are created for headers in markdown and textile files. The
  152. folding level for the headers can be defined by two methods, configurable with
  153. |g:pandoc#folding#mode|. The default mode, "syntax", uses the header syntax to
  154. determine the level. So
  155. ### this is level 3
  156. #### this is level 4
  157. ###### this is level 6
  158. #### this is level 4
  159. # this is level 1
  160. The "relative" mode counts the number of parents the header has, so
  161. ### this is level 1
  162. #### this is level 2
  163. ###### this is level 3
  164. #### this is level 2
  165. # this is level 1
  166. The "stacked" mode counts all headers as first level, and it can be used to
  167. view all the headers at once.
  168. The mode can be changed on the fly using the *:PandocFolding* command which
  169. takes as argument the options "syntax", "relative" and "stacked". If no
  170. argument is given, then automatic folding will be disabled.
  171. Besides this, some extensions are provided:
  172. * If present, fold the document's YAML frontmatter (this is configurable with
  173. |g:pandoc#folding#fold_yaml|)
  174. * The foldlevel for YAML frontmatter is 1 by default (this is configurable
  175. with |g:pandoc#folding#foldlevel_yaml|)
  176. * Fold divs of the classes defined in |g:pandoc#folding#fold_div_classes|. For
  177. example, you might want to create notes for a presentation. pandoc
  178. understands
  179. <div class="notes">
  180. this is an observation
  181. </div foldend>
  182. is a note and will suppress it from the slides. Now, you might want to hide
  183. those while preparing the slides, and that's where this feature comes in
  184. handy (the `folding` module folds divs of the `notes` class by default, you
  185. can disable that clearing g:pandoc#folding#fold_div_classes).
  186. Note: You must add the `foldend` attribute to the closing `div` tag,
  187. otherwise the folding levels can get messed up.
  188. * Fold in custom marked comments. For example, this will fold
  189. <!-- Custom fold fold-begin -->
  190. blah blah blah...
  191. <!-- fold-end -->
  192. Note: This also works in textile files, with `.. fold-begin` and `..
  193. fold-end`.
  194. * Fold emulating vim's marker folding method (see 'foldmethod'). By default,
  195. this will only work for marks within comments (see
  196. |g:pandoc#folding#markers_in_comments_only|). For example,
  197. <!-- {{{3 -->
  198. this is a marked fold
  199. <!-- }}} -->
  200. * Fold fenced codeblocks. By default, this is disabled, but can be turned on
  201. by setting |g:pandoc#folding#fold_fenced_codeblocks| to 1.
  202. * To avoid the continuous recomputation of folds, in particular in insert mode,
  203. set |g:pandoc#folding#fastfolds| to 1 to defer it to the switches between
  204. insert and normal mode. For a plug-in that will make Vim recompute the folds
  205. only when need be, see https://github.com/konfekt/fastfold . This also
  206. disables the calculation of folds when using split windows, where the foldexpr
  207. function can get called many more times than usual.
  208. - COMMAND *vim-pandoc-command-module*
  209. Note: Full functionality of this module requires python support.
  210. The `command` module sets up a buffer-local *:Pandoc* command which handles
  211. pandoc execution. This command builds an incantation for pandoc using
  212. vim-pandocs configuration and the current state of the buffer
  213. (bibliographies found, etc.).
  214. The syntax of the :Pandoc command is as follows:
  215. :Pandoc[!] OUTPUT-FORMAT ARGS
  216. Where OUTPUT-FORMAT is the value you would normally pass to the -t option in
  217. pandoc, and ARGS are auxiliary arguments you want to pass pandoc. For example,
  218. :Pandoc beamer -Vlang:spanish
  219. will create an incantation like:
  220. pandoc -t beamer -Vlang:spanish -o file.pdf file.pdc
  221. :Pandoc will also use the value of |b:pandoc_biblio_bibs| to pass
  222. `--bibliography` arguments, so the user shouldn't do that himself.
  223. In nvim, vim-pandoc will open a terminal buffer and execute pandoc. If the
  224. value of |g:pandoc#command#use_message_buffers| is 1 and some error occurred,
  225. a buffer will open displaying the command output (this is unnecessary in nvim,
  226. because it will always display the command output, so the default value for
  227. `use_message_buffers' is 0). You can dismiss these buffers pressing 'q'.
  228. Regardless of pandoc's execution status, the invocation used will be logged so
  229. it can be checked using |:messages|.
  230. If you write a bang ('!') after the command, vim-pandoc will try to open
  231. the created file in its associated program. This behavior can be customized
  232. through the |g:pandoc#command#custom_open| variable. The
  233. |g:pandoc#command#prefer_pdf| variable controls whether to prefer pdf files,
  234. if they exist.
  235. Note: The pandoc execution is performed asynchronously if vim supports the
  236. |clientserver| feature and the running instance is a valid server (this is the
  237. default for gvim, but must be made explicit when running in a terminal, see
  238. |x11-clientserver|). This feature also requires python to be available in the
  239. system.
  240. The :Pandoc command has argument completion for supported output formats and
  241. pandoc option arguments.
  242. Note: Previously, vim-pandoc used the executors system present in
  243. vim-pandoc, which allowed for the execution of command pipelines. This is no
  244. longer supported. If you want to pass the file through a filter, use pandoc's
  245. -F option.
  246. As a convenience, you can have vim-pandoc auto execute pandoc on writes. To
  247. enable this functionality, set |g:pandoc#command#autoexec_on_writes| to 1 and
  248. provide a command to execute like so:
  249. let |g:pandoc#command#autoexec_command| = "Pandoc! pdf"
  250. You can use different commands for different filetypes, if needed. For example,
  251. autocmd FileType beamer let |g:pandoc#command#autoexec_command| = "Pandoc! beamer"
  252. autocmd FileType pandoc let |g:pandoc#command#autoexec_command| = "Pandoc! pdf"
  253. You can also use a buffer local variable if you want to override the global
  254. setting.
  255. let |b:pandoc_command_autoexec_command| = "Pandoc! html"
  256. Notice that vim-pandoc also defines and sets a 'compiler' pandoc that can be
  257. started by ':make' or ':lmake' and compiles the current file by pandoc.
  258. *Pandoc-native*
  259. If you vim doesn't have support for python, you can still use a limited
  260. version of the Pandoc command, however this will not support autocompletion,
  261. the convenience abbreviations or the ability to open the file after compiling
  262. (these features might be supported in the feature). Thus, instead of
  263. Pandoc pdf
  264. you would need to issue
  265. Pandoc -o myfile.pdf
  266. -- TEMPLATES *vim-pandoc-command-templates*
  267. It might get tedious to reuse the same arguments over and over. For example,
  268. the user might frequently execute
  269. :Pandoc! pdf -Vdocumentclass=memoir -Vdocumentclassoptions=article -Vmainfont='GFS Bodoni'
  270. He can save this incantation as a 'template', so later he could simply run
  271. :Pandoc! #my_usual_article
  272. Note: templates don't record if a bang was used for the Pandoc command, so once
  273. #my_usual_article is defined, both ':Pandoc #my_usual_article' and ':Pandoc!
  274. #my_usual_article' are possible.
  275. *:PandocTemplate*
  276. To save the latest :Pandoc incantation as a template, the user should execute
  277. :PandocTemplate save my_usual_article
  278. It is also possible to save a custom incantation like this
  279. :PandocTemplate save fancy_article pdf -Vdocumentclass=memoir -Vmainfont='Helvetica Neue'
  280. To review some template, use
  281. :PandocTemplate get my_usual_article
  282. which should output the template definition.
  283. - MENU *vim-pandoc-menu-module*
  284. Creates a menu for pandoc handled files. If the `command` module is enabled,
  285. you can build your documents from it.
  286. - KEYBOARD *vim-pandoc-keyboard-module*
  287. Registers custom mappings for applying text styles, navigating the documents
  288. and more. To keep things neat, this module loads mappings from submodules.
  289. |g:pandoc#keyboard#enabled_submodules| determines which of those are enabled.
  290. The default mappings can be disabled as a whole setting
  291. |g:pandoc#keyboard#use_default_mappings| to 0. The mappings for individual
  292. modules can be disabled using |g:pandoc#keyboard#blacklist_submodule_mappings|.
  293. This is list of the mappings currently implemented (in brackets, the modes
  294. where they are available):
  295. - *<localleader>i* toggles emphasis [vn]
  296. - *<localleader>b* toggles bold [vn]
  297. - *<localleader>`* toggles verbatim [vn]
  298. - *<localleader>~~* toggles strikeout [vn]
  299. - *<localleader>^* toggles superscript [vn]
  300. - *<localleader>_* toggles subscript [vn]
  301. - *<localleader>#* apply header (accepts a count) [n]
  302. - *<localleader>hd* remove header [n]
  303. - *<localleader>hn* move to next header [n]
  304. - *<localleader>hb* move to previous header [n]
  305. - *<localleader>hh* go to current header [n]
  306. - *<localleader>hp* go to current header's parent [n]
  307. - *<localleader>hsn* move to next sibling header [n]
  308. - *<localleader>hsb* move to previous sibling header [n]
  309. - *<localleader>hcf* move fo first child header [n]
  310. - *<localleader>hcl* move to last child header [n]
  311. - *<localleader>hcn* move to [count] nth child header [n]
  312. - ]] [count] sections forward (like <localleader>hn) [n]
  313. - [[ [count] sections backwards [n]
  314. - ][ [count] move to the next section end [n]
  315. - [] [count] move to the previous section end [n]
  316. - aS select a section, including header [vo]
  317. - iS select a section, excluding header [vo]
  318. - *<localleader>nr* insert a ref definition after this paragraph [n]
  319. - *<localleader>rg* go to reference definition [n]
  320. - *<localleader>rb* go back to reference label [n]
  321. - *<localleader>gl* go to current link in current window
  322. - *<localleader>sl* go to current link in split window
  323. - *<localleader>gb* go back from link
  324. - *<localleader>gB* go back from link to the previous file
  325. - *<localleader>ln* move to next list item [n]
  326. - *<localleader>lp* move to previous list item [n]
  327. - *<localleader>ll* move to the current list item [n]
  328. - *<localleader>llp* move to parent of the current list item [n]
  329. - *<localleader>lsn* move to the next list item sibling [n]
  330. - *<localleader>lsp* move to the previous list item sibling [n]
  331. - *<localleader>lcf* move to the first list item child [n]
  332. - *<localleader>lcl* move to the last list item child [n]
  333. - *<localleader>lcn* move to the [count] nth list item child [n]
  334. - *<localleader>cb* toggle checkbox or insert empty checkbox in list item [vn]
  335. - *<localleader>cd* remove existing checkbox from list item [vn]
  336. For |<localleader>#|, you can decide what header style to use (always atx, use
  337. setex, append hashes at the end) by setting the
  338. |g:pandoc#keyboard#sections#header_style| variable.
  339. Some of the reference-related mappings use |mark-motions|. You can configure
  340. what mark to use by setting the value of |g:pandoc#keyboard#references#mark|,
  341. in case the default ("r") is not suitable or needs to serve a different
  342. purpose.
  343. Some key mappings are affected by the editing mode (soft/hard wraps). In soft
  344. mode, vim-pandoc maps j and k to move across visible lines, not real ones, to
  345. ease navigation. This is controlled by the |g:pandoc#keyboard#display_motions|
  346. variable.
  347. - BIBLIOGRAPHIES *vim-pandoc-bibliographies-module*
  348. Note: This module requires python support.
  349. Provides with support for bibliographic info completion and retrieval, and
  350. also populates the |b:pandoc_biblio_bibs| variable, which the |:Pandoc|
  351. command uses to build up the pandoc incantation.
  352. vim-pandoc can handle BibTeX, RIS, MODS and JSON bibliographies.
  353. The way the module populates the b:pandoc_biblio_bibs variable is determined
  354. by the value of the |g:pandoc#biblio#sources| variable. Depending on it, the
  355. module will gather bibliographies on the following order (between brackets,
  356. the corresponding flag to give g:pandoc#biblio#sources):
  357. 1) [b] Search for any bibliography that shares the name of the current file in the
  358. current directory.
  359. So, if the document is named `paper.mkd`, it will look for `paper.bib`,
  360. `paper.ris`, and so on.
  361. 2) [c] Search for any bibliography in the current dir.
  362. 3) [l] Search for default bibliographies (`default.bib`, `default.ris`, etc.) in pandoc's
  363. data dir ("$HOME/.pandoc/" in *nix, "%APPDATA%/pandoc/" in Windows)
  364. 4) [t] Search for bibliographies in the local texmf tree (requires the
  365. `kpsewhich` program)
  366. 5) [g] Add any bibliographies listed in |g:pandoc#biblio#bibs|.
  367. 6) [y] Add any bibliographies specified in a YAML header.
  368. 7) [G] Add any bibliographies in the current git repository.
  369. The default flags are "bcgyG". For the 'c', 'l', and 't' flags, the
  370. |g:pandoc#biblio#bib_extensions| is taken into account. You can, of
  371. course, modify the value of |b:pandoc_biblio_bibs| at any time.
  372. The `bibliographies` module also provides the functions that allow the
  373. `completion` module to give suggestions for citation keys (see below).
  374. By default, this will only return matches for citekeys, but it is possible to
  375. retrieve suggestions that match in any key by using the bibtool program. So,
  376. if you are matching from
  377. @armstrong
  378. you might retrieve both
  379. @armstrong1989 Armstrong, David M. - A Combinatorial Theory of Possibility
  380. @lewis1992 Lewis, David - Armstrong on Combinatorial Possibility
  381. This is off by default, but can be turned on (if `bibtool` is available) by
  382. setting the |g:pandoc#biblio#use_bibtool| variable to 1.
  383. You can pass extra arguments to `bibtool` by setting
  384. |g:pandoc#biblio#bibtool_extra_args|. The default is "-r biblatex", which
  385. enables support for biblatex bibliographies (bibtex bibliographies will still
  386. work).
  387. TIP: If you use unite.vim, you might want to check https://github.com/msprev/unite-bibtex
  388. - YAML *vim-pandoc-yaml-module*
  389. This module gathers data from YAML headers, if present, and keeps it in the
  390. *b:pandoc_yaml_data* variable. Other modules might be configured using this.
  391. - COMPLETION *vim-pandoc-completion-module*
  392. Provides |omni-completion|. If the `bibliographies` module is active, it will
  393. complete bibliographic references from the bibliography sources defined in
  394. |g:pandoc#biblio#sources|.
  395. The bibliographic completion has two backends, selected with the
  396. |g:pandoc#completion#bib#mode| variable, 'fallback' and 'citeproc'. 'fallback'
  397. uses internal information extractors for bibtex, ris and json bibliographies,
  398. and 'citeproc' uses pandoc-citeproc for additional bibliography database types
  399. and extra features. The 'citeproc' backend is experimental for now, but it is
  400. planned to become the default in the future.
  401. To use completion, start typing a citekey, e.g.,
  402. @geac
  403. and then, while still in insert mode, hit CTRL-X CTRL-O (vim's shortcut
  404. for |omni-completion|), and you'll get a popup window with a list of
  405. matching keys, e.g.,
  406. @geach1970 Geach, P. T. – Entailment
  407. @geach1972 Geach, P. T. – Logic Matters
  408. Regular expressions work too:
  409. @le.*90
  410. should suggest both '@leftow1990' and '@lewis1990', assuming those are
  411. both keys in your bibliography.
  412. Tip: If you only want to complete from a list of citations, you could
  413. create a file (let's say, `citations.dict`) that contains such a list, one
  414. item at a time:
  415. @adams1967a
  416. @adams1971
  417. @adams1972a
  418. @adams1974
  419. @adams1977
  420. @adams1986a
  421. and then add it to vim's |`dictionary`|, like so
  422. setlocal dictionary="citations.dict"
  423. Then, you can complete from this list by pressing CTRL-X CTRL-K.
  424. If the 'citeproc' backend is used, extra information can be displayed in the
  425. preview window, depending on the value of
  426. |g:pandoc#completion#bib#use_preview|.
  427. -- AUTOCOMPLETE *vim-pandoc-complete-auto*
  428. Vim does not provide automatic completion by itself, but there exist several
  429. plugins that provide this: |deoplete|, |neocomplete|, |ncm2|,
  430. |nvim-completion-manager|, and |youcompleteme|. There is also |vimcompletesme|
  431. that overrides <tab> to trigger different built-in completions, such as
  432. the omni-completion by |vim-pandoc|, depending on the context. See below for
  433. descriptions on how to set some of these up with |vim-pandoc|.
  434. -- DEOPLETE *vim-pandoc-complete-deoplete*
  435. |deoplete| is a moder remake of |neocomplete|, and was originally written
  436. specifically for Neovim, see here: https://github.com/Shougo/deoplete.nvim. It
  437. is a highly customizable and flexible completion manager.
  438. To configure for `vim-pandoc`, one may use: >
  439. " This is new style
  440. call deoplete#custom#var('omni', 'input_patterns', {
  441. \ 'pandoc': '@'
  442. \})
  443. " This is old style (deprecated)
  444. if !exists('g:deoplete#omni#input_patterns')
  445. let g:deoplete#omni#input_patterns = {}
  446. endif
  447. let g:deoplete#omni#input_patterns.pandoc = ['@']
  448. <
  449. -- NEOCOMPLETE *vim-pandoc-complete-neocomplete*
  450. |neocomplete| is also a flexible automatic completion engine for vim, although
  451. active development has been stopped. Users are recommended to change to
  452. |deoplete|, see also |vim-pandoc-complete-deoplete|. The plugin is available
  453. here: https://github.com/Shougo/neovomplete.vim.
  454. The following options may be used to enable automatic completion for pandoc
  455. documents with |neocomplete| and `vim-pandoc`s omni completion function: >
  456. if !exists('g:neocomplete#sources#omni#input_patterns')
  457. let g:neocomplete#sources#omni#input_patterns = {}
  458. endif
  459. let g:neocomplete#sources#omni#input_patterns.pandoc =
  460. \ '@'
  461. <
  462. -- NCM2 *vim-pandoc-complete-ncm2*
  463. |ncm2| is a modern remake and replacement of |nvim-completion-manager| and is
  464. supposed to be a "Slim, Fast and Hackable Completion Framework for Neovim":
  465. https://github.com/ncm2/ncm2
  466. The following simple configuration should work well with `vim-pandoc`: >
  467. " include the following plugins (here using junnegun/vim-plug)
  468. Plug 'roxma/nvim-yarp'
  469. Plug 'ncm2/ncm2'
  470. augroup my_cm_setup
  471. autocmd!
  472. autocmd BufEnter * call ncm2#enable_for_buffer()
  473. autocmd Filetype pandoc call ncm2#register_source({
  474. \ 'name': 'pandoc',
  475. \ 'priority': 8,
  476. \ 'scope': ['pandoc'],
  477. \ 'mark': 'md',
  478. \ 'word_pattern': '\w+',
  479. \ 'complete_pattern': ['@'],
  480. \ 'on_complete': ['ncm2#on_complete#omni', 'pandoc#completion#Complete'],
  481. \ })
  482. augroup END
  483. <
  484. -- NVIM-COMPLETION-MANAGER *vim-pandoc-complete-ncm*
  485. Note: |nvim-completion-manager| has been replaced by |ncm2|, and users are
  486. recommended to change. See |vim-pandoc-compete-ncm2| for hints on how to setup
  487. |ncm2| for |vim-pandoc|.
  488. |nvim-completion-manager| is a fast, extensible, async completion framework
  489. for neovim (and Vim version 8.0 and above). The project is available here:
  490. https://github.com/roxma/nvim-completion-manager
  491. To configure for `vim-pandoc`, one can use the following code: >
  492. augroup my_cm_setup
  493. autocmd!
  494. autocmd User CmSetup call cm#register_source({
  495. \ 'name': 'pandoc',
  496. \ 'priority': 8,
  497. \ 'scoping': 1,
  498. \ 'scopes': ['pandoc'],
  499. \ 'abbreviation', 'md',
  500. \ 'cm_refresh_patterns': ['@'],
  501. \ 'cm_refresh: {'omnifunc': 'pandoc#completion#Complete'},
  502. \ })
  503. augroup END
  504. <
  505. -- YOUCOMPLETEME *vim-pandoc-complete-youcompleteme*
  506. |youcompleteme| is probably the most popular code-completion engine for Vim.
  507. The github repository is here: https://github.com/Valloric/YouCompleteMe.
  508. It is described as:
  509. > YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine
  510. > for Vim. It has several completion engines: an identifier-based engine that
  511. > works with every programming language, a semantic, Clang [3]-based engine
  512. > that provides native semantic code completion for the C-family languages,
  513. > a Jedi [4]-based completion engine for Python, an OmniSharp [5]-based
  514. > completion engine for C# and an omnifunc-based completer that uses data from
  515. > Vim's omnicomplete system to provide semantic completions for many other
  516. > languages (Ruby, PHP etc.).
  517. To enable automatic completion with |youcompleteme| for `vim-pandoc`, use the
  518. following options: >
  519. if !exists('g:ycm_semantic_triggers')
  520. let g:ycm_semantic_triggers = {}
  521. endif
  522. let g:ycm_semantic_triggers.pandoc = ['@']
  523. let g:ycm_filetype_blacklist = {}
  524. <
  525. -- VIMCOMPLETESME *vim-pandoc-complete-vcm*
  526. A plugin that maps <tab> to trigger the built-in completion that is most
  527. suitable to the current context. The plugin is available here:
  528. https://github.com/ajh17/VimCompletesMe.
  529. The following options may be used to enable completion with the <tab> trigger
  530. for pandoc documents with |vimcompletesme| and `vim-pandoc`s omni completion
  531. function: >
  532. augroup VimCompletesMePandoc
  533. autocmd!
  534. autocmd FileType pandoc
  535. \ let b:vcm_omni_pattern = '@'
  536. augroup END
  537. <
  538. - TOC *vim-pandoc-toc-module*
  539. Provides the *:TOC* command, which displays a table of contents for the
  540. current file using vim's location list system. The position of the TOC window
  541. is configured by the |g:pandoc#toc#position| variable.
  542. When the user presses <CR> (the Enter key) in the TOC buffer, the cursor is
  543. moved in the source window to the position selected. By default, the TOC
  544. buffer is closed after this, but this can be circumvented by pressing <C-CR>.
  545. This behavior can be reversed by setting |g:pandoc#toc#close_after_navigating|
  546. to 0.
  547. The indentation in the TOC buffer can be tuned by |g:pandoc#toc#shift|
  548. variable, which definds the shift in number of spaces per level.
  549. - SPELL *vim-pandoc-spell-module*
  550. Sets up spelling for files handled by vim-pandoc. Spelling is on by default,
  551. but can be changed with the |g:pandoc#spell#enabled| variable. The user can
  552. also specify what languages to use by default with the
  553. |g:pandoc#spell#default_langs| variable.
  554. - HYPERTEXT *vim-pandoc-hypertext-module*
  555. Adds some basic hypertext functions. Files and addresses can be opened in
  556. system defined applications by pressing `gx`, or within vim, if possible, by
  557. pressing `gf`.
  558. Let's suppose you are editing the file "notes.md" with the contents:
  559. #) [important thing to do](important.html)
  560. #) [another thing to do](another.html)
  561. and the files "important.md" and "another.md" are available. Pressing `gf`
  562. over "important.html" will open "important.md" within the current vim instance
  563. (this behavior of opening alternate files can be disabled by setting
  564. |g:pandoc#hypertext#open_editable_alternates| to 0). `gx` would open
  565. "important.html" in the browser, if the file existed.
  566. See ||g:pandoc#hypertext#open_cmd| and |g:pandoc#hypertext#preferred_alternate| for
  567. info on how to configure this modules's behavior.
  568. There's an addition keyboard shortcut for following the link at cursor,
  569. support `automatic link`, `inline link`, `reference link` and `images`. When
  570. you press the shortcut, it will try to get the link address at cursor, and
  571. then open it by VIM or system application. If the link address starts with a
  572. `#`, then it will be treated as an header ID, and then will try to move the
  573. cursor to specified header.
  574. After moving, you can use |<localleader>gb| to move back to that link.
  575. See |vim-pandoc-keyboard-module| ro detail.
  576. SETTINGS *vim-pandoc-settings*
  577. Module configuration variables defaults are initialized when the modules
  578. themselves are initialized. This is so the global variable scope is not
  579. cluttered with unused variables for users who have disabled some modules.
  580. A description of the available configuration variables follows:
  581. - *g:pandoc#filetypes#handled*
  582. default = ["pandoc", "rst", "textile"]
  583. + ["markdown"] (if |g:pandoc#filetypes#pandoc_markdown| is 1)
  584. A list of the kinds of files vim-pandoc will attach to. 'extra' includes
  585. .text and .txt files. For what values are valid here, see the
  586. pandoc_extensions_table variable in plugin/pandoc.vim
  587. - *g:pandoc#filetypes#pandoc_markdown*
  588. Default = 1
  589. Should we set the pandoc filetype (and load vim-pandoc-syntax) for common
  590. markdown extensions (*.md, *.mkd, etc)? Since regular markdown and pandoc's
  591. markdown variant differ, someone might want to restrict those extensions to
  592. regular markdown. In that case, we use vim's default syntax highlighting for
  593. markdown. See |g:pandoc#filetypes#handled| above.
  594. - *g:pandoc#modules#enabled*
  595. default = ["formatting", "folding", "bibliographies", "completion",
  596. "metadata", "menu", "executors", "keyboard", "toc", "spell", "hypertext"]
  597. A list of the modules to enable on the files determined by
  598. |g:pandoc#filetypes#handled|. See |vim-pandoc-modules|.
  599. - *g:pandoc#modules#disabled*
  600. default = [], (["bibliographies", "command"] in vim < 7.4)
  601. Auxiliary module blacklist.
  602. - *g:pandoc#formatting#mode*
  603. default = "s"
  604. h: use hard wraps
  605. a: autoformat
  606. A: smart autoformatting
  607. s: use soft wraps
  608. - *g:pandoc#formatting#textwidth*
  609. default = 79
  610. Default textwidth, used for hard wraps mode. This is used by the default equalprg
  611. setting, so it must be set before it.
  612. - *g:pandoc#formatting#smart_autoformat_on_cursormoved*
  613. default = 0
  614. Trigger smart autoformatting when moving the cursor in insert mode. If
  615. enabled, it might cause some lag.
  616. - *g:pandoc#formatting#equalprg*
  617. default = "pandoc -t markdown [--columns {g:pandoc#formatting#textwidth}|--wrap=none]"
  618. What command to use for equalprg. If set to '', vim's default will be used.
  619. See |'equalprg'|.
  620. NOTE the default changes depending on whether the formatting mode uses hard
  621. or soft wraps.
  622. - *g:pandoc#formatting#extra_equalprg*
  623. default = "--reference-links"
  624. Extra arguments to append to the value of equalprg. Useful when the default
  625. behavior of |g:pandoc#formatting#equalprg| wants to be preserved.
  626. - *g:pandoc#command#use_message_buffers*
  627. default = 1
  628. Whether to display pandoc's output in a message buffer after execution.
  629. - *g:pandoc#command#latex_engine*
  630. default = "xelatex"
  631. The LaTeX engine to use with pandoc. 'xelatex' is the default for greater
  632. unicode compatibility.
  633. - *b:pandoc_command_latex_engine*
  634. default = None
  635. As |g:pandoc#command#latex_engine|, but for the current file.
  636. - *g:pandoc#command#path*
  637. default = "pandoc"
  638. The name of the pandoc command. Can also be an absolute path if the program
  639. is not located in the $PATH.
  640. - *g:pandoc#command#custom_open*
  641. default = ""
  642. A function to be used to open the created file. This function must take an
  643. argument, for the path of the file created, and return a string with the
  644. command that should open the file. For example: >
  645. let g:pandoc#command#custom_open = "MyPandocOpen"
  646. function! MyPandocOpen(file)
  647. let file = shellescape(fnamemodify(a:file, ':p'))
  648. let file_extension = fnamemodify(a:file, ':e')
  649. if file_extension is? 'pdf'
  650. if !empty($PDFVIEWER)
  651. return expand('$PDFVIEWER') . ' ' . file
  652. elseif executable('zathura')
  653. return 'zathura ' . file
  654. elseif executable('mupdf')
  655. return 'mupdf ' . file
  656. endif
  657. elseif file_extension is? 'html'
  658. if !empty($BROWSER)
  659. return expand('$BROWSER') . ' ' . file
  660. elseif executable('firefox')
  661. return 'firefox ' . file
  662. elseif executable('chromium')
  663. return 'chromium ' . file
  664. endif
  665. elseif file_extension is? 'odt' && executable('okular')
  666. return 'okular ' . file
  667. elseif file_extension is? 'epub' && executable('okular')
  668. return 'okular ' . file
  669. else
  670. return 'xdg-open ' . file
  671. endif
  672. endfunction
  673. <
  674. - *g:pandoc#command#prefer_pdf*
  675. default = 0
  676. Open a pdf file preferrably, if it exists.
  677. - *g:pandoc#command#autoexec_on_writes*
  678. default = 0
  679. Execute a command automatically on writes.
  680. - *g:pandoc#command#autoexec_command*
  681. default = ''
  682. Which command to autoexecute on writes if
  683. |g:pandoc#command#autoexec_on_writes| is enabled.
  684. - *b:pandoc_command_autoexec_command*
  685. default = unset
  686. Buffer-local override for |g:pandoc#command#autoexec_command|.
  687. - *g:pandoc#command#templates_file*
  688. default = split(&runtimepath, ",")[0]."/vim-pandoc-templates"
  689. Where to save and retrieve command templates.
  690. - *g:pandoc#compiler#command*
  691. default = "{g:pandoc#command#path}"
  692. The name of the command invoked in |:Pandoc|. Can also be an absolute path
  693. if the program is not located in the $PATH.
  694. The difference to |g:pandoc#command#path| is that the latter is used for
  695. internal purposes. For example, if you want to use Panzer: >
  696. let g:pandoc#compiler#command = "panzer"
  697. <
  698. - *g:pandoc#compiler#arguments*
  699. default = ''
  700. Additional arguments for the command invoked in |:Pandoc|.
  701. For example, if you're using Panzer this setting is recommended: >
  702. let g:pandoc#compiler#arguments = "---quiet ---strict"
  703. <
  704. - *g:pandoc#biblio#sources*
  705. default = "bcgy"
  706. Where to look for bibliographies:
  707. b: use files with the same name as the current file, in the working dir
  708. c: use any bibliography in the working dir
  709. l: look in pandoc's local dir
  710. t: look in the local texmf tree
  711. g: append items in |g:pandoc#biblio#bibs|
  712. y: look in the current file's YAML header
  713. - *g:pandoc#biblio#bib_extensions*
  714. default = ["bib", "bibtex", "ris", "mods", "enl", "wos", "medline", "copac"]
  715. What extensions to use for 'c', 'l', and 't' values in
  716. |g:pandoc#biblio#sources|.
  717. - *g:pandoc#biblio#bibs*
  718. default = []
  719. A list of bibliographies to use globally if 'g' is in
  720. |g:pandoc#biblio#sources|.
  721. - *b:pandoc_biblio_bibs*
  722. default = []
  723. Extra bibliographies to use for the |:Pandoc| command, local to the buffer.
  724. - *g:pandoc#biblio#use_bibtool*
  725. default = 0
  726. Use bibtool for queries, if available (might help performance).
  727. - *g:pandoc#completion#bib#mode*
  728. default = 'fallback'
  729. Which backend to use for retrieving bibliographic information. 'fallback'
  730. uses internal implementations for bibtex, ris, mods and json files.
  731. 'citeproc' uses pandoc-citeproc for support of additional bibliography types
  732. and extra features. Note: The 'citeproc' backend is experimental for now,
  733. but will become the default in the future.
  734. - *g:pandoc#completion#bib#use_preview*
  735. default = 1
  736. Should extra bibliographic completion information be displayed in the
  737. |preview-window|? Requires the 'citeproc' backend.
  738. - *g:pandoc#keyboard#enabled_submodules*
  739. default = ["lists", "references", "styles", "sections", "links", "checkboxes"]
  740. What mapping groups to enable.
  741. - *g:pandoc#keyboard#display_motions*
  742. default = 1
  743. Use display motions when using the soft wrap mode.
  744. - *g:pandoc#keyboard#wrap_cursor*
  745. default = 0
  746. Wrap the cursor around line boundaries (see |onemore|)
  747. - *g:pandoc#keyboard#references#mark*
  748. default = "r"
  749. What mark to use (i.e, when navigating references, to keep track of original
  750. position).
  751. - *g:pandoc#keyboard#sections#header_style*
  752. default = "a"
  753. What style to use when applying headers. Default is to use atx headers
  754. everywhere. "s" enables setext headers for level 1 and 2 headers, "2"
  755. appends atx marks at both ends of the header.
  756. - *g:pandoc#keyboard#use_default_mappings*
  757. default = 1
  758. Use default mappings. Otherwise, the user should provide his own.
  759. - *g:pandoc#keyboard#blacklist_submodule_mappings*
  760. default = []
  761. A list of submodules of the keyboard module whose mappings should be
  762. disabled. Allows finer handling of default mappings than
  763. |g:pandoc#keyboard#use_default_mappings|.
  764. - *g:pandoc#folding#level*
  765. default = &foldlevel
  766. The value of |'foldlevel'| for opened files.
  767. - *g:pandoc#folding#fdc*
  768. default = 1
  769. Width of the window's |foldcolumn|. To disable, set to 0.
  770. - *g:pandoc#folding#mode*
  771. default = 'syntax'
  772. How to decide what level the headers are. Default value follows syntax
  773. rules, 'relative' uses information about the header parents. For example, in
  774. this document >
  775. ## header
  776. blah blah
  777. #### header
  778. blah blah blah
  779. <
  780. the level of "## header" is 2 using the default method, but 1 using
  781. relative, and the level of "#### header" is 4 using the default method, but
  782. 2 using relative.
  783. 'stacked' takes all headers as first level.
  784. - *g:pandoc#folding#fold_yaml*
  785. default = 0
  786. Fold YAML frontmatters.
  787. - *g:pandoc#folding#foldlevel_yaml*
  788. default = 1
  789. Foldlevel for YAML frontmatters.
  790. - *g:pandoc#folding#fold_div_classes*
  791. default = ["notes"]
  792. What div classes to fold. NOTE: you need to end the folds using the
  793. `foldend` attribute in the closing tag, like so: >
  794. <div class="notes">
  795. test
  796. </div foldend>
  797. <
  798. - *g:pandoc#folding#fastfolds*
  799. default = 0
  800. Defer recomputation of folds to the switches between insert and normal mode.
  801. For a plug-in that will make Vim recompute the folds only when need be, see
  802. https://github.com/konfekt/fastfold
  803. - *g:pandoc#folding#fold_vim_markers*
  804. default = 1
  805. Emulate vim's "marker" foldmethod.
  806. - *g:pandoc#folding#vim_markers_in_comments_only*
  807. default = 1
  808. Only emulate marker foldmethod for marks inside HTML comments.
  809. - *g:pandoc#folding#fold_fenced_codeblocks*
  810. default = 0
  811. Fold fenced codeblocks.
  812. - *b:pandoc_folding_basic*
  813. buffer local. default = 0
  814. When set, forces vim-pandoc to use basic folding in the current buffer.
  815. - *g:pandoc#toc#position*
  816. default = "right"
  817. Where to show the TOC window. Can be "top", "left", "right", "bottom".
  818. - *g:pandoc#toc#close_after_navigating*
  819. default = 1
  820. Must the TOC window close after selecting a location? This also controls the
  821. behavior of the <CR> key. If '1', <CR> navigates and closes the TOC, <C-CR>
  822. simply navigates. If '0', this behavior is reversed.
  823. - *g:pandoc#toc#shift*
  824. default = 2
  825. Defines the number of spaces per level to indent the higher level
  826. positions in TOC buffer.
  827. - *g:pandoc#spell#enabled*
  828. default = 1
  829. Enable spelling for files handled by vim-pandoc.
  830. - *g:pandoc#spell#default_langs*
  831. default = []
  832. What languages to use for spelling by default for files handled by
  833. vim-pandoc.
  834. - *g:pandoc#hypertext#open_editable_alternates*
  835. default = 1
  836. If opening locally files matching
  837. |g:pandoc#hypertext#editable_alternates_extensions|, try to open a vim
  838. editable file instead. For example, if you try to open "test.html" and
  839. "test.md" is available in the same folder, vim will try to edit "test.md".
  840. - *g:pandoc#hypertext#editable_alternates_extensions*
  841. default = '\(pdf\|htm\|odt\|doc\)'
  842. A regular expression determining for what files a vim editable file
  843. should be opened instead when opening locally.
  844. - *g:pandoc#hypertext#preferred_alternate*
  845. default = "md"
  846. What alternate extension should be preferred, for cases where several
  847. editable files are available when opening locally and
  848. |g:pandoc#hypertext#open_editable_alternates| is 1.
  849. - *g:pandoc#hypertext#split_open_cmd*
  850. default = "botright vsplit"
  851. How to split-open files within vim.
  852. - *g:pandoc#hypertext#edit_open_cmd*
  853. default = "edit"
  854. How to edit-open files within vim.
  855. - *g:pandoc#hypertext#autosave_on_edit_open_link*
  856. default = 0
  857. Automatically save the current file when following some link in the same
  858. window for editing.
  859. - *g:pandoc#hypertext#create_if_no_alternates_exists*
  860. default = 0
  861. When open the link at cursor, and it does not exist, set this to `1` to
  862. automatically create the file with the given extension or the extension of
  863. |g:pandoc#hypertext#preferred_alternate|.
  864. To use this for alternate files, the value of
  865. |g:pandoc#hypertext#open_editable_alternates| should be 1.
  866. - *g:pandoc#hypertext#use_default_mappings*
  867. default = 1
  868. Use default mappings.
  869. FAQ *vim-pandoc-faq*
  870. Q: On opening a pandoc file the current work dir is not that of the file,
  871. what's wrong?
  872. A: Add to your `vimrc` the line
  873. >
  874. autocmd FileType pandoc :lchdir %:p:h
  875. <
  876. As a possible alternative, see also *autochdir* and the plug-in
  877. >
  878. https://github.com/fmoralesc/vim-extended-autochdir
  879. <
  880. Q: Editing text is laggy. What's wrong?
  881. A: See |g:pandoc#folding#fastfolds|.
  882. CONTRIBUTE *vim-pandoc-contribute*
  883. vim-pandoc welcomes any contribution, in the form of bug reports, patches,
  884. code, suggestions, etc. To do so, please open an issue in our issue tracker on
  885. Github at https://github.com/vim-pandoc/vim-pandoc/issues or email the
  886. maintainer (see below). See also |vim-pandoc-devel| for documentation.
  887. WHO *vim-pandoc-who*
  888. The current vim-pandoc's maintainer is Felipe Morales (fmoralesc), whom you
  889. can reach at hel.sheep@gmail.com
  890. vim-pandoc is the fruit of the labor of a bunch of people. It includes, in one
  891. shape or the other, the work of dsanson, lyokha, jtanguy, tlvince, ehamberg,
  892. blaenk, gokcechan, shelhamer, clvv, PiPeep, mwhite, wunki, ulel, lyeoh, ulel,
  893. felixSchl, zmanji, lmullen, Propatsch, ivotron, tpoisot, 00Davo. We have
  894. borrowed from Jeremy Schultz, plasticboy and cirosantilli, too. Many thanks to
  895. all of them.
  896. vim:tw=78:ts=8:noet:ft=help:fdm=marker