http://blog.tuxcoder.com/2008/12/vim-restructure-text-macros.html を参考に、日本語タイトルに対応する。 vimスクリプトが全く判らないので、Pythonに頼った。 キーマップとか、もっと賢い方法があると思う。 python <<EOF _e_a_width_map = dict(F=2, H=1, W=2, Na=1, A=2, N=1) def _count_width(s): import unicodedata return sum(_e_a_width_map.get(unicodedata.east_asian_width(c), 0) for c in s) def rst_heading(n=0): import vim u = vim.current.line.decode(vim.eval('&encodi