Created
May 30, 2017 09:57
-
-
Save mbailey/2f7c878eed123cab6fb125117f35aecc to your computer and use it in GitHub Desktop.
yamlise - see YAML when editing JSON files in VIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" yamlise - see YAML when editing JSON files in vim. | |
" | |
" Created for people with JSON phobia, this should | |
" only be used when all attempts to master JSON | |
" have failed. http://www.json.org/ | |
" | |
" I hope it isn't too late for these folks! | |
" 'Please. This is critical for us.' | |
" https://github.com/aws/aws-cli/issues/2275#issuecomment-277829948 | |
" | |
" Installation | |
" ============ | |
" 1. Install cfn-flip https://github.com/awslabs/aws-cfn-template-flip | |
" 2. Include this file in your ~/.vimrc | |
" 3. vim cloudformation-params.json | |
" YOU SHOULD NOW SEE THE YAML YOU CRAVE | |
" 4. :wq | |
" The file should now contain the JSON Amazon CLI expects | |
" | |
:augroup yamlise | |
: autocmd! | |
: autocmd BufReadPost,FileReadPost *.json '[,']!cfn-flip | |
: autocmd BufWritePre,FileWritePre *.json '[,']!cfn-flip | |
: autocmd FileAppendPre *.json '[,']!cfn-flip | |
:augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment