Help pasting some yaml from the documentation into the terminal

Hey!
I remember there’s a keyboard shortcut that helps realign or adjust the indentation of YAML after pasting it from the Kubernetes documentation—especially when pasting directly into the terminal. I can’t quite recall what it is (maybe something with Ctrl+Shift+< or similar).

If anyone knows the shortcut or a quick way to fix the indentation on the fly, I’d really appreciate the help.

Usually you’d do this in your editor; for the exam, that really means using vim. There really is not an “autoformatting” option for this. You need to be able to select text and change its indentation. We have a pretty good introduction to how you do this in Vim with its “visual mode”. Take a look at that; it’s pretty useful for getting yaml correctly indented.

1 Like