Whenever I copy NodeAffinity from documentation to yaml , I did not get it inden . . .

Rahul:
Whenever I copy NodeAffinity from documentation to yaml , I did not get it indentated in YAML :disappointed: and looks like below . How can I ensure that the copy from documentation is always indented ?

I have edited my vimrc ( set ts=2 sw=2 expandtab)

spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: http://kubernetes.io/e2e-az-name|kubernetes.io/e2e-az-name
operator: In
values:
- e2e-az1
- e2e-az2
containers:
- image: nginx
name: nginx
resources: {}

Tej_Singh_Rana:
Hello, @Rahul
paste is available in your .vimrc file?
Or
> I have edited my vimrc ( set ts=2 sw=2 expandtab)
only above one.

Rahul:
yes @Tej_Singh_Rana. paste is available

Rahul:
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
set bg=dark
set nowrap
set paste
set ts=2 sw=2 expandtab
:nnoremap p ]p

Tej_Singh_Rana:
Please have a look for this post :-
https://community.kodekloud.com/t/vim-tip-if-you-are-an-avid-vim-user-and-use-it-extensively-here-is-a-small-t/15022