ansible-snippets


Ⅰ. 插件描述

Ansible Vim snippets

Ⅱ. 基本信息

创建日期:  2017-01-30
使用用户:  9
Github星:  12
插件作者:  Jimena Cabrera Notari

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'phenomenes/ansible-snippets'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'phenomenes/ansible-snippets'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'phenomenes/ansible-snippets'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/phenomenes/ansible-snippets

Ⅳ. 文档说明

# ansible-snippets

Ansible Vim snippets for SnipMate and UltiSnips.

Requirements

Install

To install via vim-plug add the
following to your ~/.vimrc

Plug 'phenomenes/ansible-snippets'

This repo follows ansible's devel
branch, if you wish to install a previous version you need to specify the tag

Plug 'phenomenes/ansible-snippets', { 'tag': 'v2.4.0' }

Alternatively you can install it manually by cloning the repo to your ~/.vim

cd ~/.vim/
git clone -b v2.4.0 https://github.com/phenomenes/ansible-snippets.git ~/ansible-snippets

Usage

Open a .yml or .yaml file, in insert mode type play or any Ansible's
module name and press <tab> to expand the snippet:

- hosts: group
  user: root
  tasks:

- name: task_description
  ec2:
    image: None
    instance_type: None
    #kernel:
    #monitoring:
    #user_data:
    #termination_protection:
    #private_ip:
    #spot_type: one-time
    #ec2_url:
    #id:
    #source_dest_check: True
    #aws_secret_key:
    #spot_wait_timeout: 600
    ...

Press <tab> again to move to the next argument.

License

BSD 2-clause "Simplified" License

添加新评论