skypacer210 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

rst syntax file, completion #108

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The completion ^x^p doesn't work for words with some special characters like ä 
with rst syntax highlighting. It works fine with other syntax files but not 
with rst. Attached is an example document where the comletion will fail for the 
last word in the text.

I have tried to figure out where the problem could be, but I have no idea, I'm 
already happy to have tracked it down to the rst syntax file 
http://code.google.com/p/vim/source/browse/runtime/syntax/rst.vim.

Thanks

Original issue reported on code.google.com by mortba...@gmail.com on 15 Feb 2013 at 5:30

Attachments:

GoogleCodeExporter commented 9 years ago
Problem is, the rst syntax file includes the lisp syntax file, which sets the 
'iskeyword' option to unwanted values. I think, the syntax script should reset 
those settings back.

As a workaround, create a file ~/.vim/after/syntax/rst.vim and put into it
:set isk&vim

Then the keyword completion should work again.

Original comment by chrisbr...@googlemail.com on 15 Feb 2013 at 7:08

GoogleCodeExporter commented 9 years ago
BTW, this issue should probably be forwarded to the maintainer of the rst file 
(which you can find in the top of the syntax file)

Original comment by chrisbr...@googlemail.com on 16 Feb 2013 at 9:17

GoogleCodeExporter commented 9 years ago
Your workaround works like a charm, thank you. I sent a mail to the maintainer.

Original comment by mortba...@gmail.com on 18 Feb 2013 at 1:37

GoogleCodeExporter commented 9 years ago
It sounds more like syntax/lisp.vim should be fixed to not change 'iskeyword' 
to the value that it changes it to.

Also, you can exclude lisp from the languages that you want to have 
syntax/rst.vim support for code blocks.

Original comment by nikolai....@gmail.com on 18 Feb 2013 at 2:58

GoogleCodeExporter commented 9 years ago
I see. Well I also sent a mail to the lisp syntax file maintainer maybe he will 
fix it.

Original comment by mortba...@gmail.com on 18 Feb 2013 at 3:21

GoogleCodeExporter commented 9 years ago
Closing as invalid for now.

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 7:04

GoogleCodeExporter commented 9 years ago

Original comment by chrisbr...@googlemail.com on 30 Sep 2014 at 9:23

GoogleCodeExporter commented 9 years ago
Here is a patch, that guards the 'rst' syntax file from a changed 'isk' option 
by sourcing other syntax files.
@Charles, you might want to review setting the 'isk' option in the lisp syntax 
file.

Original comment by chrisbr...@googlemail.com on 1 Oct 2014 at 5:40

Attachments: