Coder Social home page Coder Social logo

ubaldot / vim-writegood Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.07 MB

Check your English prose in Vim.

Home Page: https://www.vim.org/scripts/script.php?script_id=6073

License: BSD 3-Clause "New" or "Revised" License

Vim Script 100.00%
linting prose vim9

vim-writegood's Introduction

vim-writegood

Check your English prose in Vim.

Introduction

Vim-writegood check your English prose.

It is nothing but a simple Vim9 wrapper around prose linters.

Requirements

You must have a prose linter installed. Currently supported linters are write-good and vale. Check their docs for installation and configuration guidelines.

Oh, and you need Vim9 of course.

Usage

Vim-writegood has only one command:

:WriteGoodToggle

which is used to turn on and off the linter.

The diagnostic messages are stored in the quickfix list and displayed in the command-line. You can use all the quickfix list features such as :cnext, :cprev, :copen, etc. to conveniently move around. See :h quickfix for more info.

The quickfix list automatically updates "on save", i.e. you must save your file to refresh the linting otherwise you won't see your problems to disappear.

Warning

When you change (or come back to a previous) buffer, you have to manually re-enable the linting. Don't be fooled if the highlight is still on! To fix it, run :WriteGoodToggle once or twice, that's all.

Configuration

There are few parameters that you can tweak:

# Default values
g:writegood_compiler = "writegood" # Can be "writegood" or "vale".
g:writegood_options = "" # CLI options to append to write-good call
g:writegood_linehl = "CursorLine"
g:writegood_text = "--"
g:writegood_texthl = ""

To figure out the meaning of the latter three parameters, check :h sign_define() and to figure out possible values type :highlight.

Contributing

Feel free to send a PR if have any improvement ideas.

License

BSD3-Clause.

vim-writegood's People

Contributors

ubaldot avatar

Stargazers

 avatar  avatar

Watchers

 avatar

vim-writegood's Issues

Use popup instead of display on command-line.

Add a flag so that the user can choose if displaying messages on the status line or in a popup window.
Display in popup window shall be also implemented.
You can check :h popup_atcursor() and update wgfunctions.DisplayMessage() function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.