Vim

3 January, 2023 - Tags: git


Vim

       _
__   _(_)_ __ ___
\ \ / / | '_ ` _ \
 \ V /| | | | | | |
  \_/ |_|_| |_| |_|

Vim is the only editor you get faster with time.

cp file.yaml file.yaml.backup

The idea is to short this down and use

cp file.yaml file.yaml.b
kubectl run nginx-pod --image=nginx --dry-run=client -oyaml | vim - 

and then you can save the file using :wq pod.yaml. This will save some of your time during the exam and this is what I prefer.

I find "gi" a particular powerful command: it starts insert mode in the last place where you have inserted text before, so you can write something, exit insert mode, navigate around the text, and then press "gi" and continue writing in the same place.