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

Make markdownCodeBlock Spell-checkable #30

Closed
baskerville opened this issue Dec 23, 2012 · 5 comments
Closed

Make markdownCodeBlock Spell-checkable #30

baskerville opened this issue Dec 23, 2012 · 5 comments

Comments

@baskerville
Copy link

I'd like to be able to enable spell-checking in regions tagged as markdownCodeBlock.

@tpope
Copy link
Owner

tpope commented Dec 25, 2012

Seems a bit silly, but I suppose adding an option for it wouldn't hurt much.

@baskerville
Copy link
Author

Why would it be silly?

@tpope
Copy link
Owner

tpope commented Dec 25, 2012

Just because I can't name a single language that wouldn't automatically have spelling errors on account of language keywords. C has #endif, JavaScript has var, Ruby and Python have def. Plus, any language that uses camel case is a lost cause.

@baskerville
Copy link
Author

I see.

So there's a misunderstanding: I do use code blocks not only for code (e.g. lists of command line options and their respective meaning).

Besides, spell checking is sometimes useful in the languages you mentioned to spell-check comments and strings.

@tpope
Copy link
Owner

tpope commented Dec 25, 2012

I think a more semantic way to do that would be to highlight just the option as code.

* `--help`: show usage information.

Using code blocks for things that shouldn't even be fixed width falls under my definition of silly.

You can get spell checking inside strings and comments if the syntax file for the language supports it, and you enable fenced code blocks for that language:

let g:markdown_fenced_languages = ['ruby', 'javascript']
```ruby
# This is spell-checked
but_this_isnt = true
```

@tpope tpope closed this as completed Jul 11, 2014
xmas7 added a commit to xmas7/bspwm that referenced this issue Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants