Skip to content

skywind3000/LeaderF-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaderf-snippet

This plugin takes the advantage of the well-known fuzzy finder Leaderf to provide an intuitive way to input snippets:

Snippet names are hard to remember, therefore, I made a Leaderf extension to help input snippets.

Feature

  • Read snippets from SnipMate, UltiSnips, NeoSnippet, or LuaSnip.
  • Display snippet descriptions in the fuzzy finder.
  • Work in both INSERT mode and NORMAL mode.

Installation

" Leaderf-snippet
Plug 'Yggdroot/LeaderF'
Plug 'skywind3000/Leaderf-snippet'

A supported snippet engine, UltiSnips (recommended), SnipMate, or NeoSnippet is required.

Configuration

" maps
inoremap <c-x><c-x> <c-\><c-o>:Leaderf snippet<cr>

" optional: preview
let g:Lf_PreviewResult = get(g:, 'Lf_PreviewResult', {})
let g:Lf_PreviewResult.snippet = 1

Why Leaderf ?

vim-fzf has a Snippets command, but it doesn't provide enough information for each snippet and it can't work correctly in INSERT mode:

Compare to fzf, Leaderf has a NORMAL mode which allows me to browse my snippets more easily like in a normal vim window:

Browse my snippets with full of details. No worry about forgetting snippets.

TODO

  • snipmate
  • ultisnips
  • neosnippet
  • luasnip
  • snipmate preview
  • ultisnips preview
  • neosnippet preview
  • minisnip

Credit

  • Leaderf: An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly.

About

Intuitive Way to Use Snippet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published