vim - Vi IMproved, a programmers text editor
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]
ex gex view
gvim gview vimx evim eview
rvim rview rgvim rgview
Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs.
To search and replace globally in a file
:%s/search/replace/g
- When you try to paste yaml directly
- name: install packages
pip:
name: openshift==0.11.2
tags:
- docker-image
- full-deploy
- code-deploy
- After pasting it in vi. 0_0
- name: install packages
pip:
name: openshift==0.11.2
tags:
- docker-image
- full-deploy
- code-deploy
- Turn off the auto-ident when you paste code in
exec
mode reference link
:set paste
- Now go to insert mode and paste the yaml ( you should see
-- INSERT (paste) --
at the bottom)
- name: install packages
pip:
name: openshift==0.11.2
tags:
- docker-image
- full-deploy
- code-deploy
- You can turn it back on