9th July 2016
Using Vim to edit Puppet code
- # yum -y install vim-enhanced
- # vi /etc/profile
# add at the last line
alias vi=’vim’
# source /etc/profile # reload - # 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
endifif has(“autocmd”)
au BufReadPost * if line(“‘\””) > 1 && line(“‘\””) <= line(“$”) | exe “normal! g’\”” | endif
filetype plugin indent on
endifset 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”