Hi Guys, Perhaps this topic already discussed, But I am currently facing some is . . .

Ramkumar A:
Hi Guys,
Perhaps this topic already discussed, But I am currently facing some issue. When I try copy and paste the code from k8s doc using “set paste” in vim and use “tab” for indentation, but when I try to crate resource I am getting error “error parsing error converting yaml to json found character that cannot start any token”

I could see from goggle this because of indentation method, we need to use 2 space instead of tab.

I am going to take CKA exam in a week, is there any workaround or tricks to avoid this issue, I believe using space for indentation will take time.

Thanks for your help :slight_smile:

Shrey Shekhar:

sudo vi ~/.vimrc
set autoindent

Alistair Mackay:
Hi @Ramkumar A

This is how I configured vi for exams. There’s a lot of other useful info about exam on this page
https://github.com/fireflycons/tips-for-CKA-CKAD-CKS#vim-vi

Ramkumar A:
Thanks Guys. Appreciate your help
i + f3 combination along with other settings mentioned it’s working as expected )

Alistair Mackay:
But beware in the exam that F3 might not work! If you find it does not, then enter normal mode (press ESC ) and use commands
:set paste and :set nopaste
I raised a ticket about this, and all they said was that they would inform PSI.

unnivkn:
Hi @Ramkumar A fyr:

unnivkn:
https://stackoverflow.com/questions/506075/how-do-i-fix-the-indentation-of-an-entire-file-in-vi

unnivkn:
https://stackoverflow.com/questions/69998/tabs-and-spaces-in-vim