Re: replacement directive and formatting tables (in vim)
Guenter Milde via Docutils-users <[email protected]> Mon, 4 Nov 2019 10:58:43 -0000 (UTC)
| Newsgroups | gmane.text.docutils.user |
|---|---|
| Message-ID | <[email protected]> |
On 2019-11-03, Saša Janiška wrote: > Hello, > in my content I have a need to use many replacement directives, e.g. for > entering Unicode characters for planets, so I have things like: > .. |Jupiter| replace:: ♃ > However, since rst uses '|' as table's cell separator, when I use the > above-like replacement directives, they clash with the code used to > reformat tables in vim (using https://github.com/gu-fan/riv.vim) > package, so I wonder if someone can provide some workaround to be able > to stay with rst **and** using vim editor? Unfortunately, there is no simple way to use a different syntax for replacements. You may use `simple tables`__ without |, but maybe these cannot be formatted by your editor. __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#simple-tables You could also try to teach the table formatter the difference between a table column separator (with whitespace around, regexp "(^| )[|]( |$)") and the replacement syntax (no inner whitespace). Finally, it may be simpler to use the Unicode characters directly via drag-and drop or group-replacing a placeholder in the editor. Ahoj, Günter _______________________________________________ Docutils-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/docutils-users Please use "Reply All" to reply to the list.