Proper Treatment 正當作法/ blog/ posts/ The the
標籤 Tags:
2010-04-24 02:27

To search for duplicate words in a manuscript (such as “the the”) in Vim, look for this pattern. (Erratum 2009-10-13: changed \+ to * to find “or or”.)

\m\c\<\\\@<!\([a-z]\%(['a-z]*[a-z]\)\?\)\_W\+\\\@<!\1\>

用 Vim 搜尋上列樣式,可以抓到文稿裡諸如 “the the” 一類的重複詞。 (2009-10-13 勘誤:把 \+ 改為 * 才能找到 “or or”。)