Skip to content

chimay/vimscript-tricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

VimL is full of features, but sometimes it is hard to find which function or command will do the job you want.

If you ever searched the web for vim script ex command output in a var, you surely have had results talking about :redir. This is ok, but there is a more elegant solution for this particular problem.

This (neo)vim help page collects vim script snippets, whose some were hard to find. You may already know some of them, and I hope you will gladly discover the others.

Usage

Straightforward :

:help vimscript-tricks

Don't forget to run :

:helptags doc

to be able to use the inline help.

Installation

Using vim-packager

Simply add this line after packager#init() to your initialisation file :

call packager#add('chimay/vimscript-tricks', { 'type' : 'start' })

and run :PackagerInstall (see the vim-packager readme).

Using minpac

Simply add this line after minpac#init() to your initialisation file :

call minpac#add('chimay/vimscript-tricks', { 'type' : 'start' })

and run :PackUpdate (see the minpac readme).

Using vim-plug

The syntax should be similar with other git oriented plugin managers :

Plug 'chimay/vimscript-tricks'

and run :PlugInstall to install.

Cloning the repo in a pack-start directory

You can clone the repository somewhere in your runtime-search-path. You can get a minimal version by asking a shallow clone (depth 1) and filtering out the screenshots blobs :

mkdir -p ~/.local/share/nvim/site/pack/foo/start
cd ~/.local/share/nvim/site/pack/foo/start
git clone --depth 1 --filter=blob:none https://github.com/chimay/vimscript-tricks

About

Advanced snippets to help you code vimscript plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published