Coder Social home page Coder Social logo

yaml-vim's Introduction

# Vim syntax files
# Language: YAML
# Author:   Igor Vergeichik <[email protected]>
# Author:   Nikolai Weibull <[email protected]>
# Sponsor:  Tom Sawyer <[email protected]>
# Sponsor:  Ingy döt Net <[email protected]>

YAML.VIM and YAML collection sorting scripts:

INSTALLATION:
- Put yaml.vim in vim's syntax folder (/usr/share/vim/syntax on my system)
- Add the .yaml/.yml extensions to the filetype.vim file: |
    " Yaml
    au BufNewFile,BufRead *.yaml,*.yml    setf yaml
- If you want add a new enty to the syntax menu:
    an 50.110.370 &Syntax.WXYZ.Yaml :cal SetSyn("yaml")<CR>
- Put yamlsort.rb and yamlsort.vim into ~/.vim/scripts directory.

SORT USE:
- Type vim command: |
    :source ~/.vim/scripts/yamlsort.vim
- Then: >
    <F4> is mapped to sort YAML collections in direct order, 
    and <F5> in reversed order.

NOTES:
- If you want change key mapping of sorting rules edit yamlsort.vim

TODO:
- Work with short notation of collections and mappings ({}, [])
- Support sorting of multiline values

Changelog:
  2010-02-19:
  - Merge Nikolai Weibull's rendition of yaml.vim (thanks to Phill Baker).
  2002-06-09:
  - Key field can contain any number of spaces before column.
  - >
    If any record of collection does not key field (i.e field which
    value is used in sorting), it is placed to the end of collection.

yaml-vim's People

Contributors

ingydotnet avatar pose avatar trans avatar wellle avatar

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.