Mercurial > vim
annotate src/po/cleanup.vim @ 21403:d387121083a4 v8.2.1252
patch 8.2.1252: ":marks" may show '< and '> mixed up
Commit: https://github.com/vim/vim/commit/54c3fcd852f9d986f81547429e850b3364f058d6
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 19 22:09:06 2020 +0200
patch 8.2.1252: ":marks" may show '< and '> mixed up
Problem: ":marks" may show '< and '> mixed up.
Solution: Show the mark position as where '< and '> would jump.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jul 2020 22:15:03 +0200 |
parents | 325a1dbf662d |
children | 5d26e9a7f8f2 |
rev | line source |
---|---|
449 | 1 " Vim script to cleanup a .po file: |
2 " - Remove line numbers (avoids that diffs are messy). | |
3 " - Comment-out fuzzy and empty messages. | |
4 " - Make sure there is a space before the string (required for Solaris). | |
439 | 5 " Requires Vim 6.0 or later (because of multi-line search patterns). |
658 | 6 |
7 " Disable diff mode, because it makes this very slow | |
8 let s:was_diff = &diff | |
9 setl nodiff | |
10 | |
11686
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
11 " untranslated message preceded by c-format or comment |
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
12 silent g/^#, c-format\n#/.d |
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
13 silent g/^#\..*\n#/.d |
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
14 |
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
15 silent g/^#[:~] /d |
557 | 16 silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ / |
17 silent g/^msgstr"/s//msgstr "/ | |
18 silent g/^msgid"/s//msgid "/ | |
19 silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ / | |
658 | 20 |
11686
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
21 silent g/^\n\n\n/.d |
325a1dbf662d
patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents:
658
diff
changeset
|
22 |
658 | 23 if s:was_diff |
24 setl diff | |
25 endif |