Using Vim to edit Puppet code

  1. # yum -y install vim-enhanced
  2. # vi /etc/profile
    # add at the last line
    alias vi=’vim’
    # source /etc/profile # reload
  3. # cat .vimrc
    ” vimrc: Managed by puppet – DO NOT EDIT
    ” Changes manually to this file can, and will, be lostset nocompatibleif has(“syntax”)
    syntax on
    set background=dark
    endif

    if has(“autocmd”)
    au BufReadPost * if line(“‘\””) > 1 && line(“‘\””) <= line(“$”) | exe “normal! g’\”” | endif
    filetype plugin indent on
    endif

    set backspace=2
    set hlsearch
    set showcmd
    set showmatch
    set ignorecase
    set smartcase
    set incsearch
    set autowrite
    set hidden
    set number
    let &guicursor = &guicursor . “,a:blinkon0”