Description | Installation | Usage | Mapping | Commands | Customization | Notes
Zeavim allows to use Zeal documentation browser directly from Vim.
This plugin works on GNU/Linux and Windows.
To use zeavim, you need of course to have Zeal installed. Grab it from here and install it .
Install the distributed files into Vim runtime directory which is usually ~/.vim/
, or $HOME/vimfiles
on Windows.
And this is the best way, use a vim plugin manager:
Plugin manager | In vimrc | Installation command |
---|---|---|
Vim-plug | Plug 'KabbAmine/zeavim.vim' |
PlugInstall |
Vundle | Plugin 'KabbAmine/zeavim.vim' |
PluginInstall |
NeoBundle | NeoBundle 'KabbAmine/zeavim.vim' |
NeoBundleInstall |
They are 3 ways of using zeavim:
<leader>z
- Execute Zeal with the current word (Or visual selection in VISUAL mode) as a query and the file type as a docset *.<leader>Z
(Note the capital z) - To specify a query in the current docset *.
<leader><leader>z
- To specify manually both query and docset (The docset name can be completed usingtab
, see completion for that. ).
* If the file type is not defined, the plugin use file extension or the docset name specified by the command Docset
.
You can easily change the mapping keys of zeavim:
nmap NEW_MAPPING <Plug>Zeavim " <leader>z (NORMAL mode)
vmap NEW_MAPPING <Plug>ZVVisSelection " <leader>z (VISUAL mode)
nmap NEW_MAPPING <Plug>ZVKeyword " <leader>Z
nmap NEW_MAPPING <Plug>ZVKeyDocset " <leader><leader>z
If you don't want to use all those functionalities, you can disable the default mapping and map only what you want.
For those of you who prefer using commands, here they are:
Zeavim " Normal
ZvV " VISUAL mode
ZvK " Type query
ZvKD " Type docset and query
If you need a lazy way to specify a docset, you can use:
Docset DOCSET_NAME
As an example, I'm working on a scss
file but I want to get compass
documentation when using Zeavim, so I just need to specify manually this docset:
Docset compass
Then Zeavim only for the current buffer will use compass
as a docset.
The docset name can be completed, for that see completion.
To revert that and get zeavim working like usually, a simple Docset
without argument is enough.
By default zeavim assumes that zeal is located in %ProgramFiles/Zeal/zeal.exe
for Windows and /usr/bin/zeal
for UNIX systems.
You can specify Zeal's location manually by adding in your vimrc:
if has('win32') || has('win64')
let g:zv_zeal_directory = " path\\to\\zeal.exe\""
else
let g:zv_zeal_directory = "/usr/bin/zeal"
endif
Zeavim generates the zeal docset name from the extension (Or the filetype vim option) of the current file, but if you need to add some other file types, you can create in your vimrc a dictionary with the extension or the vim file type as the key and the value as the docset name:
let g:zv_added_files_type = {
\ 'EXTENSION': 'DOCSET_NAME',
\ 'FILE_TYPE': 'DOCSET_NAME',
\ }
As an example (Those file types are already included into zeavim):
let g:zv_added_files_type = {
\ 'cpp': 'C++',
\ 'js': 'Javascript',
\ 'md': 'Markdown',
\ 'mdown': 'Markdown',
\ 'mkd': 'Markdown',
\ 'scss': 'Sass',
\ }
You can disable the default mappings by adding to your vimrc:
let g:zv_disable_mapping = 1
When using <leader><leader>z
or the command Docset
, you can get a docset name completion with Tab
(Or with <C-d>
depending of your vim options).
There are 2 ways to enable that:
-
The docset names can be taken from your zeal's docset directory (The one specified in Zeal's options), just set the correct path in
g:zv_docsets_dir
in your vimrc:if has('win32') || has('win64') let g:zv_docsets_dir = 'path\\to\\docsets\\directory\\' else let g:zv_docsets_dir = 'path/to/docsets/directory' endif
-
If you want to enable completion just for a few docsets (Why not!), instead of
g:zv_docsets_dir
you can useg:zv_lazy_docset_list
.There is an example:
let g:zv_lazy_docset_list = [ 'Compass', 'Bootstrap', 'Vagrant', 'Font Awesome' ]
Zeavim is my first vim plugin and it was created in the beginning for a personal use, so please feel free to report bug(s) and contact me if you want, I usually answer in 1-2 days.
Thank to Jerzy Kozera for creating such wonderful open-source application.
Thank to Bram Moolenaar for creating the best piece of software in the world :D
Thank to you if you're using zeavim.