Skip to content

(N)Vim plugin for YAGPDB Custom Commands.

License

Notifications You must be signed in to change notification settings

STROJTYK/yagpdb.vim

 
 

Repository files navigation

YAGPDB Custom Commands Vim plugin

Syntax highlighting for YAGPDB custom commands in (N)Vim.

CI

Installing

Manually

To install without any external plugin-manager dependencies, simply download the Makefile and run make install. For a different destination, invoke make with DESTDIR=/path/to/destination.

wget https://raw.githubusercontent.com/l-zeuch/yagpdb.vim/master/Makefile && make install

Note If you wish to install this for your Vim, but also have Neovim installed, make sure to invoke the install-vim target instead.

See also as Greg Hurrell's excellent Youtube video: Vim screencast #75: Plugin managers.

With a Plugin Manager

Note Installing with a plugin manager is recommended for Windows installations.

Use your favorite plugin manager to install this plugin. tpope/vim-pathogen, VundleVim/Vundle.vim, junegunn/vim-plug, and Shougo/dein.vim are some of the more popular ones. A lengthy discussion of these and other managers can be found on vi.stackexchange.com. Basic instructions are provided below, but please be sure to read, understand, and follow all the safety rules that come with your power tools plugin manager.

Pathogen Pathogen is more of a runtime path manager than a plugin manager. You must clone the plugins' repositories yourself to a specific location, and Pathogen makes sure they are available in Vim.
  1. In the terminal,

    git clone https://github.com/l-zeuch/yagpdb.vim.git ~/.vim/bundle/yagpdb.vim
  2. In your vimrc,

    call pathogen#infect()
    syntax on
    filetype plugin indent on
Vundle
  1. Install Vundle, according to its instructions.

  2. Add the following text to your vimrc.

    call vundle#begin()
      Plugin 'l-zeuch/yagpdb.vim'
    call vundle#end()
  3. Restart Vim, and run the :PluginInstall statement to install your plugins.

Vim-Plug
  1. Install Vim-Plug, according to its instructions.

  2. Add the following text to your vimrc.

    call plug#begin()
      Plug 'l-zeuch/yagpdb.vim'
    call plug#end()
  3. Restart Vim, and run the :PlugInstall statement to install your plugins.

Dein
  1. Install Dein, according to its instructions.

  2. Add the following text to your vimrc.

    call dein#begin()
      call dein#add('l-zeuch/yagpdb.vim')
    call dein#end()
  3. Restart Vim, and run the :call dein#install() statement to install your plugins.

Configuration

Clipboard

If you prefer to insert text on a middle click with your mouse instead of Ctrl + V, change the register used as follows:

let g:yagpdbcc_use_primary = 1

Code Completion (Neovim >0.5 ONLY)

We provide bundled sources for code-completion to be used with hrsh7th/nvim-cmp. Follow the installation instructions there and enable the source as follows:

sources = cmp.config.sources({
    ...
    { name = 'yagpdb-cc' },
    ...
})

Overriding Filetypes

Sometimes, you may wish to use a file extension already in use by another language, such as *.gotmpl. Enable also detecting those extension as follows, if needed:

let g:yagpdbcc_override_ft = 1

Snippet Engines

We provide snippets for two distinct engines: UltiSnips, and Neosnippet.

Select which one to use by setting the g:yagpdbcc_snippet_engine variable to either ultisnips, or neosnippet, like so:

let g:yagpdbcc_snippet_engine = "ultisnips"

Contributing

If you spot an error, or want to contribute new features, feel free open a pull request! Please refer to CONTRIBUTING for our guidelines on how to contribute.

Other Contributions

Some of the regex in this plugin was developed by @DZ-TM. If you like it, feel free to give him cookies as a reward.

Legal Mumbo Jumbo

Disclaimer

  1. The YAGPDB developers, staff, and/or suport are not responsible for any difficulties caused by this plugin.

  2. This plugin is provided as-is, without the intention to cause offense of any kind.

  3. YAGPDB is a service provided by botlabs and is in no way associated with this plugin.

  4. The developers of this plugin have been granted permission to use the brand name YAGPDB in this plugin. Please view the permission file for details.

License

This project is licensed under the terms of the GNU General Public License, version 2.0 (SPDX-Identifier GPL-2.0). Please refer to the LICENSE file for more details.

About

(N)Vim plugin for YAGPDB Custom Commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 79.4%
  • Makefile 10.3%
  • Python 6.9%
  • Vim Snippet 3.4%