From: Guenter M. <mi...@us...> - 2019-11-04 10:59:05
|
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 |