GithubHelp home page GithubHelp logo

vis-ins-completion's Introduction

Vis insert completion

Basic insert mode completion for the vis editor. Works in insert and replace modes and supports multiple selections.

Complete Methods

  • line completion:
    • mapped to <C-x><C-l>
  • character completion:
    • mapped to <C-Up> and <C-Down>
    • in vim this is mapped to <C-E> and <C-Y>
    • need some improvements, specially to handle multi-byte characters.
  • dictionary completion:
    • mapped to <C-x><C-k>
    • dictionary must be a new-line separated list of items.
    • wl.sh is a helper that reads from stdin and prints a new-line separated list of words/WORDS to stdout
    • default dictionary path: ~/.local/share/dict/{syntax}.
    • syntaxes names are the same defined by the filetype.lua plugin
  • keyword completion:
    • mapped to <C-n>. Note that this will overwrite standard word completion mapping
    • this method combine the output of shell commands in the completeopts table.
    • the default behaviour is to combine word completion and dictionary completion.

Configuration

You can set some options from init.lua file or from your visrc.lua:

Installation

Each script can be instaled separetaly. For example:

mkdir -p ~/.config/vis/plugins
cd ~/.config/vis/plugins
curl -O https://raw.githubusercontent.com/jpaulogg/vis-ins-completion/master/complete-dict.lua
echo 'require("plugins/complete-dict")' >> ../visrc.lua

To install all scripts:

mkdir -p ~/.config/vis/plugins
cd ~/.config/vis/plugins
git clone https://github.com/jpaulogg/vis-ins-completion
echo 'require("plugins/vis-ins-completion")' >> ../visrc.lua

vis-ins-completion's People

Contributors

jeremybobbin avatar jpaulogg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jeremybobbin

vis-ins-completion's Issues

error loading when installed via vis-plug

error message from vis

/home/opn/.cache/vis-plug/plugins/vis-ins-completion/init.lua:5: module 'plugins/ins-completion/complete-dict' not found:
	no field package.preload['plugins/ins-completion/complete-dict']
	no file '/home/opn/.cache/vis-plug/plugins/ins-completion/complete-dict.lua'
	no file '/home/opn/.cache/vis-plug/plugins/ins-completion/complete-dict/init.lua'
	no file '/usr/bin/lua/plugins/ins-completion/complete-dict.lua'
	no file '/usr/bin/lua/plugins/ins-completion/complete-dict/init.lua'
	no file '/home/opn/.config/vis/plugins/ins-completion/complete-dict.lua'
	no file '/home/opn/.config/vis/plugins/ins-completion/complete-dict/init.lua'
	no file '/etc/vis/plugins/ins-completion/complete-dict.lua'
	no file '/etc/vis/plugins/ins-completion/complete-dict/init.lua'
	no file '/usr/share/vis/plugins/ins-completion/complete-dict.lua'
	no file '/usr/share/vis/plugins/ins-completion/complete-dict/init.lua'
	no file '/usr/share/lua/5.4/plugins/ins-completion/complete-dict.lua'
	no file '/usr/share/lua/5.4/plugins/ins-completion/complete-dict/init.lua'
	no file '/usr/lib64/lua/5.4/plugins/ins-completion/complete-dict.lua'
	no file '/usr/lib64/lua/5.4/plugins/ins-completion/complete-dict/init.lua'
	no file ''
	no file '/usr/lib64/lua/5.4/plugins/ins-completion/complete-dict.so'
	no file '/usr/lib64/lua/5.4/loadall.so'
	no file ''

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.