po.vim spell
Hello there.
I use vim with po.vim to edit my .po files.
I always missed the fact that spelling is somewhat broken there, in
the sense that i can either:
1) have it spell check the entire document (including msgid's and comments)
2) have no spellchecking at all
because of the entropy that option 1) entails, i have always used
option 2) and thus trusted in my spelling skills and those of my
reviewer colleagues.
Today I stumpled upon a feature of the spelling 'thingy' of vim that
allows for determining the regions that should be checked for spelling
mistakes.
I had already sort of noticed it on tex.vim, but today I looked into
it and tried to implement it on po.vim.
The result is the attached patch for /usr/share/vim/vim70/syntax/po.vim
This patch only adds a @Spell on the end of the line that defines the
msgstr region.
I also added 'set spell' to my po.vim (ftplugin) and 'set spl=pt' to my vimrc.
Please try this out and see if it's worth it to submit a wishlist bug
to vim-runtime about this.
Best Regards,
Ricardo Silva - Portuguese Translation Team
--- /usr/share/vim/vim70/syntax/po.vim 2007-08-28 19:30:40.000000000 +0100
+++ po.vim 2008-03-12 21:47:31.000000000 +0000
@@ -11,6 +11,7 @@
finish
endif
+
let s:cpo_save = &cpo
set cpo-=C " Allow line continuations
@@ -32,7 +33,7 @@
syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
\ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAccelerator,poHtmlNot,poVariable
syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
- \ contains=poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAccelerator,poHtmlNot,poVariable
+ \ contains=poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAccelerator,poHtmlNot,poVariable,@Spell
" Header and Copyright
syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained
Reply to: