preservim / vim-wordy

Uncover usage problems in your writing
Other
716 stars 23 forks source link

Generate native Vim documentation #17

Open reedes opened 9 years ago

reedes commented 9 years ago

Using https://github.com/FooSoft/md2vim or similar.

ghost commented 9 years ago

Here's a quick test of what the docs look like after running them through md2vim:

https://gist.github.com/michaelx386/24660963fed7d8330ab0

The README.markdown file might need adjusting to resolve some issues like some lines being too long:

    1.7. Using wordy.......................................|vim-wordy-using_wordy|
        1.7.1. Weak and lazy usage.................|vim-wordy-weak_and_lazy_usage|
        1.7.2. Redundant and problematic usage.|vim-wordy-redundant_and_problematic_usage|
        1.7.3. Puffery and Jargon...................|vim-wordy-puffery_and_jargon|
        1.7.4. Manipulative language.............|vim-wordy-manipulative_language|
        1.7.5. To be and the passive voice.|vim-wordy-to_be_and_the_passive_voice|
        1.7.6. Colloquialisms, Idioms, and Similies.|vim-wordy-colloquialisms,_idioms,_and_similies|
        1.7.7. Miscellaneous.............................|vim-wordy-miscellaneous|
ghost commented 9 years ago

Forgot to mention md2vim allows the column length to be changed instead of the default 80 column width shown above so that's an option as well. I'm not sure what the guidelines are for Vim docs regarding column width, I guess 80 is the most compatible/standard size.

reedes commented 9 years ago

Wow, that tool does a better job than I thought it might.

Feel free to modify the README for better results in the doc generation.

Agreed that 80 columns is a good target for the compatibility.

Thanks!

ghost commented 9 years ago

I'll see if the file can be altered for a better fit. If not then perhaps md2vim can be set to only write the table of contents to a certain depth, say two levels in this case:

1. vim-wordy.................................................|vim-wordy-vim-wordy|
    1.1. Features of the wordy plugin.....|vim-wordy-features_of_the_wordy_plugin|
    1.2. What is wordy?.................................|vim-wordy-what_is_wordy?|
    1.3. Why wordy?.........................................|vim-wordy-why_wordy?|
    1.4. Requirements.....................................|vim-wordy-requirements|
    1.5. Installation.....................................|vim-wordy-installation|
    1.6. Configuration...................................|vim-wordy-configuration|
    1.7. Using wordy.......................................|vim-wordy-using_wordy|
    1.8. See also.............................................|vim-wordy-see_also|                                                                                                             
    1.9. Future development.........................|vim-wordy-future_development|

If that's suitable there might be a way to clean it up further by excluding the first level header which is only a title to flatten it out:

1. Features of the wordy plugin...........|vim-wordy-features_of_the_wordy_plugin|
2. What is wordy?.......................................|vim-wordy-what_is_wordy?|
3. Why wordy?...............................................|vim-wordy-why_wordy?|
4. Requirements...........................................|vim-wordy-requirements|
5. Installation...........................................|vim-wordy-installation|
6. Configuration.........................................|vim-wordy-configuration|
7. Using wordy.............................................|vim-wordy-using_wordy|
8. See also...................................................|vim-wordy-see_also|
9. Future development...............................|vim-wordy-future_development|

I'll take a closer look at md2vim to see what options are available.