Integration

Currently we provide integration for Bash, Zsh, and Vim, you can use the following fucntion after you activated the corresponding configuration (see subsections). Beside, Fzf is always required.

Fast Edit
Shortcut:

Ctrl+k,e

Fuzzy find snippet with Fzf and edit corresponding file with vim

Note

Ctrl+k,e means: Press Ctrl+k first, then press e immediately, same below

Fast View HTML
Shortcut:

Ctrl+k,u

Fuzzy find snippet with Fzf and open its corresponding HTML URL with xdg-open

Note

Before use this function, you should configurate base_url in CLI tool Configuration

Bash

Add the following code to your ~/.bashrc:

eval "$(snippet integration --sh --sh-binding)"

Zsh

Add the following code to your ~/.zshrc:

eval "$(snippet integration --zsh --zsh-binding)"

Fast edit demo:

Vim

Add the following code to your ~/.vimrc:

let snippet_vim = tempname()
call system('snippet integration --vim --vim-binding>' . snippet_vim)
execute 'source ' . snippet_vim
call delete(snippet_vim)

Fast edit demo: