sponsor Vim development Vim logo Vim Book Ad

vim-snipplr : frontend for http://www.snipplr.com/

 script karma  Rating 1/1, Downloaded by 439  Comments, bugs, improvements  Vim wiki

created by
t9md jp
 
script type
utility
 
description
snipplr.vim
============
Snipplr.vim is frontend for http://www.snipplr.com/
You can open your favoritted snippet or get snippet you specified by ID or URL.
Require Ruby to work(not require +ruby feature).
Currently work on *nix only.

INSTALL
---------------

    cp plugin/snipplr.vim $HOME/.vim/plugin/
    cp syntax/snipplrlist.vim $HOME/.vim/syntax/
    copy bin/snipplr.rb to one of the directory in $PATH

SETUP
---------------

Create account on http://www.snipplr.com/
You can find API KEY at buttom of "Setting" page.

then save API KEY as `~/.snipplr/api_key`

GLOVAL VARIABLE
---------------
You can exclusively set path for snipplr.rb in `.vimrc`

    let g:snipplr_rb = '$HOME/.vim/bundle/snipplr/bin/snipplr.rb'

Command
----------

snipplr.rb save snippets once get as `~/.snipplr/db.yml.`
You can avoid cache with exlamation(!) version command.

### SnipplrGet
In opend snippet buffer you can use 'i' to view informatin about that snippet.

    :SnipplrGet 1234
    :SnipplrGet http://snipplr.com/view/1234/sample

### SnipplrList

    :SnipplrList
    :SnipplrList!

### SnipplrFind
To this comman work, you have to install [ fuzzyfinder ]( http://www.vim.org/scripts/script.php?script_id=1984 )

    :SnipplrFind
    :SnipplrFind!

KeyMapping Example
------------------

    nnoremap <silent> <Space>sl :<C-u>SnipplrFind<CR>
    nnoremap <silent> <Space>sr :<C-u>SnipplrFind!<CR>

TODO
------------------
parametarize cache dir and api_key location etc..  
query with metadata(tag, user.. etc)  
post snippet from vim buffer  
more informative syntax highlight with predefined keyword for lang name  
dynamically change window height for snipplr list  
merge more than one cache data to one cache(which is comvenient for  
   collabolate with coworker  
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-snipplr.zip 0.1 2010-07-07 7.0 t9md jp Initial upload
ip used for rating: 3.141.31.240

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github