Git Product home page Git Product logo

vis-spellcheck's Introduction

vis-spellcheck

A spellchecking lua plugin for the vis editor.

Installation

  1. Download spellcheck.lua or clone this repository into your plugin directory
  2. Load the plugin in your visrc.lua with require('plugins/vis-spellcheck')

Usage

  • To enable highlighting of misspelled words press <Ctrl-w>e in normal mode.
  • To disable highlighting press <Ctrl-w>d in normal mode.
  • To toggle highlighting press <F7> in normal mode.
  • To correct the word under the cursor press <Ctrl+w>w in normal mode.
  • To ignore the word under the cursor press <Ctrl+w>i in normal mode.
  • To add the word under the cursor to the user dictionary press '<Ctrl+w>a' in normal mode.

Configuration

The module table returned from require(...) has some configuration options:

  • cmd: cmd that is passed to popen() and must return word corrections in Ispell format.
    • default: enchant -d %s
  • list_cmd: cmd that is passed to popen() and must output a list of misspelled words.
    • default: enchant -l -d %s
  • default_lang: The name of the used dictionary if the opened file does not specify one. The selected language is inserted in the cmd-strings at %s.
    • default: $LANG or en_US
  • typo_style: The style string with which misspellings should be highlighted when using the full viewport method
    • default: fore:red
  • check_tokens: A table mapping all token names we consider for spellchecking to true
    • default: {[vis.lexers.STRING]=true, [vis.lexers.COMMENT]=true, [vis.lexers.DEFAULT]=true}
  • disable_syntax_awareness: Disable the syntax aware spellchecking and use always full viewport
    • default: false

A possible configuration could look like this:

spellcheck = require(...)
spellcheck.cmd = "aspell -l %s -a"
spellcheck.list_cmd = "aspell list -l %s -a"
spellcheck.default_lang = "de_DE"

Changing language during runtime:

:set spelllang en_US

vis-spellcheck's People

Contributors

fischerling avatar ismaell avatar migueldvb avatar rnpnr avatar roguh avatar seifferth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.