Shougo / context_filetype.vim

Context filetype library for Vim script
Other
160 stars 20 forks source link

[WIP] Fix cgo support #32

Closed haruyama closed 7 years ago

haruyama commented 7 years ago

Works fine for a file with single C-style comment, but does not work for a file with multi C-style comments.

I suppose that range searching scheme of current context_filetype.vim sometimes does not work correctly. By example:

1 /*
2 */
3 
4 /*
5 */
6 import "C"

We expect [4, 6] But start pattern matches Line 1 and end pattern matches Line 6; [1, 6].

Shougo commented 7 years ago

Why it is closed? Please describe it.

haruyama commented 7 years ago

cf. https://github.com/Shougo/context_filetype.vim/issues/31#issuecomment-319808856

This PR disables without end pattern support.

I suppose that we need another approach for improving cgo support.

I suppose that supporting cgo-like range (end pattern is more important than start) needs another search_range(), which searches end pattern first and start pattern second, contrary to existing search_range().

Shougo commented 7 years ago

Oh...