Syntax highlighting for YAGPDB custom commands in (N)Vim.
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.
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.-
In the terminal,
git clone https://github.com/l-zeuch/yagpdb.vim.git ~/.vim/bundle/yagpdb.vim
-
In your
vimrc
,call pathogen#infect() syntax on filetype plugin indent on
Vundle
-
Install Vundle, according to its instructions.
-
Add the following text to your
vimrc
.call vundle#begin() Plugin 'l-zeuch/yagpdb.vim' call vundle#end()
-
Restart Vim, and run the
:PluginInstall
statement to install your plugins.
Vim-Plug
-
Install Vim-Plug, according to its instructions.
-
Add the following text to your
vimrc
.call plug#begin() Plug 'l-zeuch/yagpdb.vim' call plug#end()
-
Restart Vim, and run the
:PlugInstall
statement to install your plugins.
Dein
-
Install Dein, according to its instructions.
-
Add the following text to your
vimrc
.call dein#begin() call dein#add('l-zeuch/yagpdb.vim') call dein#end()
-
Restart Vim, and run the
:call dein#install()
statement to install your plugins.
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
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' },
...
})
We support the following list of file extensions:
*.yag
*.yagcc
*.tmpl
1)*.go.tmpl
1)
1) These extensions are not detected by default, as they are already used by Go. Please see below for instructions on how to enable them.
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
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"
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.
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.
We aim to provide up-to-date function syntax highlighting based on the official instance of YAGPDB located at
botlabs-gg/yagpdb. Should you use a fork or otherwise modified version, and wish to
generate the highlighting for that repository, modify the Makefile such that the call to .bundle/lytfs
in the
syntax:
recipe reads as follows:
syntax: .bundle/lytfs
.bundle/lytfs owner/repo@branch > syntax/funcs
# [...]
Where owner/repo
is the repository you wish to generate the syntax for, and branch
is the branch you wish to use. A
current Python 3 installation is required.
After your modification, run make generate
to update syntax definitions and the completion source file.
Warning
The lytfs
tool is potentially fragile — it makes assumptions about the file structure of the project.
Make sure to read the source code of the tool before using it and verify compatibility with your version of YAGPDB.
-
The YAGPDB developers, staff, and/or support are not responsible for any difficulties caused by this plugin.
-
This plugin is provided as-is, without the intention to cause offense of any kind.
-
YAGPDB is a service provided by botlabs and is in no way associated with this plugin.
-
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.
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.