tabby/clients/vim
Meng Zhang e28877fbbb
chore: add pre-commit workflow (#72)
* chore: add pre-commit workflow

* fix pre-commit
2023-04-09 20:17:56 +08:00
..
autoload chore: add pre-commit workflow (#72) 2023-04-09 20:17:56 +08:00
node_scripts chore: add pre-commit workflow (#72) 2023-04-09 20:17:56 +08:00
plugin chore: add pre-commit workflow (#72) 2023-04-09 20:17:56 +08:00
README.md chore: add pre-commit workflow (#72) 2023-04-09 20:17:56 +08:00

README.md

How to Use This VIM Plugin

Requirements

  1. VIM 9.0+ with +job and +textprop features enabled. NeoVIM is not supported at the moment.
  2. Node.js 16.0+, with yarn or npm installed.

Setup

  1. Build node scripts in node_scripts/ directory. Use yarn as example. You can also use npm instead.

    cd node_scripts
    yarn && yarn build
    cd ..
    
  2. Copy this directory to your VIM plugin directory.

    cp -r . ~/.vim/pack/plugins/start/tabby.vim
    
  3. (Optional) Set Tabby server URL in your vimrc file. If you do not set a URL, the default value is http://127.0.0.1:5000.

    let g:tabby_server_url = 'http://127.0.0.1:5000'
    
  4. (Optional) Turn on filetype plugin for better compatibility.

    filetype plugin on
    

Usage

  1. In insert mode, Tabby will show code suggestion when you stop typing. Press <Tab> to accpet the current suggestion, <M-]> to see the next suggestion, <M-[> to see previous suggestion, or <C-]> to dismiss.

  2. Use command :Tabby enable to enable, :Tabby disable to disable Tabby, and :Tabby status to check status.