Giter Site home page Giter Site logo

snipmate-snippets's People

Contributors

brianjriddle avatar enriquez avatar fishman avatar halorgium avatar jarmo avatar jashmenn avatar jmcantrell avatar joaovitor avatar jredville avatar kalkin avatar kris7t avatar mikem avatar scrooloose avatar sunaku avatar willian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snipmate-snippets's Issues

filetype snippets

i think the snippets should put into [filetype]/.snippet like the $vimruntime/ftplugin/
so that if i have a lot of ruby snippets , i could put them into [filetype]/
.snippet
then the snippet could be extended without configuration. :-)

bash snippets

# #!/bin/bash
# need snippet for 'usage'
# source: http://snipt.net/voyeg3r/tag/snippets
snippet date
    `system("date +%m-%d-%Y")`
# header for shell script
snippet sh
    #!/bin/bash
    # Criado em: `system("date +%m-%d-%Y")`
    # Last Change: `system("date +%m-%d-%Y")`
    # vim:ft=sh:fdm=syntax:nu:
    # Instituicao: ${1:instituicao}
    # Proposito do script: ${2:descricao}
    # Autor: ${3:`system("whoami")`}
    # site: ${4:site}
snippet #!
    #!/bin/bash
# test if has dir
snippet ifdir
    [ -d ${1:namedir} ] || mkdir $1 ; cd $1
snippet ifile
    if [ ! -e ${1:filename}  ]; then
        echo "  file $1 not present"
    fi
snippet if
    if [[ ${1:condition} ]]; then
        ${2:#statements}
    fi
snippet elif
    elif [[ ${1:condition} ]]; then
        ${2:#statements}
snippet for
    for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do
        ${3:#statements}
    done
snippet wh
    while [[ ${1:condition} ]]; do
        ${2:#statements}
    done
snippet until
    [[ ${1:condition} ]]; do
        ${2:#statements}
    done
snippet case
    case ${1:word} in
        ${2:pattern})
        ${3};;
    esac
# ifroot - if root
snippet ir
    # testa se está logado como root
    if [ "$(id -u)" != "0" ]; then
        echo "  Need be root"
        sleep 2
        exit  1
    fi
snippet lock
    LOCK_FILE=/tmp/.lock
    (set -C; :  > $LOCK_FILE) 2> /dev/null
    if [  $? != "0" ];  then
      echo "Lock File exists - exiting"
       sleep 1
       exit 1
    fi
snippet usage
    usage()
    {
        echo "Usage: $(basename $${1:0}) ${2:argument}"
        echo "${3:explanation}"
    }

Symlinks minor problem when rake is run more than once

It happened to me that I ran 'rake' twice, and when I took a look at 'snippets' dir content, every folder in there had another symlink to the same location of its parent. e.g.:

After the first 'rake', the snippets folder looked like:

~/.vim/bundle/snipmate/snippets/ruby/foo.snippet
~/.vim/bundle/snipmate/snippets/ruby/bar.snippet
...

But After the second 'rake', the snippets folder looked like:

~/.vim/bundle/snipmate/snippets/ruby/ruby
~/.vim/bundle/snipmate/snippets/ruby/foo.snippet
~/.vim/bundle/snipmate/snippets/ruby/bar.snippet
...

Where this first entry ("ruby") is actually a symlink to its parent.

I commited a change to my fork that fixed this issue for me (53f3a7f). I can pull it if you think it worths.

Untitled

Hey there,

I'm just a user. But I get this error message every time I open a Rakefile:

"Rakefile" 22L, 752C
Warning in snipMate.vim: Snippet ass is already defined. See :h multi_snip for help on snippets with multiple matches.
Warning in snipMate.vim: Snippet rep is already defined. See :h multi_snip for help on snippets with multiple matches.
Warning in snipMate.vim: Snippet anr is already defined. See :h multi_snip for help on snippets with multiple matches.
Warning in snipMate.vim: Snippet shns is already defined. See :h multi_snip for help on snippets with multiple matches.

snipMate cannot properly handle snippets that contain tags like "<+foobar+>"

example is "va.snippet": "validates_associated :<+attribute+><+, :on => :<+:create+>+>"
so, if I write "va" in my VIM - this "va" expands to "validates_associated :<+attribute+><+, :on => :<+:create+>+>", but cursor is at the end of line, and there's no navigation by fields on tab or C-j

Hovewer, snippets like "sweeper.snippet" are working well.

I use vim 7.2.182, Linux, and latest of scrooloose/snipmate-snippets and scrooloose/vimfiles.

I tried to solve this myself, and found that there's doc/imaps.txt document, but no plugin/imaps.vim, googled for that, put it into plugin/ and even got some example IMAPS with "<+...+>" working, but snipMate behavior is still the same. It ignores presence of imaps.vim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.