Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filetype specific ignore pattern #10

Open
rhysd opened this issue Aug 13, 2014 · 1 comment
Open

Filetype specific ignore pattern #10

rhysd opened this issue Aug 13, 2014 · 1 comment

Comments

@rhysd
Copy link
Owner

rhysd commented Aug 13, 2014

g:grammarous#ignore_patterns is a dictionary whose key is filetype and whose value is array of pattern. Ignored area should be linewise because line and col will be changed if it is characterwise. The pattern in the array is a dictionary and it should has a key "start" and "end" or "start" and "post_end" or simply "pattern" only. "end" means the ignored area ends with the pattern "end" indicates. "post_end" means the ignored area ends just before the pattern "post_end" indicates.
"pattern" means the matched lines are simply ignored.

Example

{
  \ 'markdown' : [{'start' : '^```', 'end' : '```'}],
  \ 'help' : [{'pattern' : '^[<>]'}, {'start' : '^>$', 'end' : '^<$'}]
\ }

Note

Before resolving this issue by Vim script, Investigation of languagetool-commandline's feature should be done.

@rhysd rhysd self-assigned this Aug 13, 2014
@rhysd
Copy link
Owner Author

rhysd commented Aug 24, 2014

It seems too complecated. Only using "parttern" key can do well. It means that I can use tha list of string which is pattern to ignore and the dictionary whose key is start, end and pattern is useless. For example, below is equivalent to above example.

{
  \ 'markdown' : [ '^```[^`]\+\_^```'],
  \ 'help' : ['\%(^>.*$\)\+', '^>.*$\_^[^>].*$.*\_^<.*$', '|.*|', '\*.*\*'],
\}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant