This happens to me from time to time when I use tmux and vim to open a yaml file . . .

Hamza Belmellouki:
This happens to me from time to time when I use tmux and vim to open a yaml file to edit. There’s no code highlighting sometimes. I love using tmux in the exam as it allows me to use multiple terminals. but sometimes these issues makes me doubt on whether I should use it or not on the exam:

Vitor Jr.:
After run tmux, try to export this variable: export TERM=screen-256color

Hamza Belmellouki:
Have you used tmux in your CKA exam?

Vitor Jr.:
Yes :slightly_smiling_face:

Vitor Jr.:
Iv’e been using tmux for the last 4 years I think

Vitor Jr.:
So I’m really used to it :smile:

Hamza Belmellouki:
Perfect! is it pre-configured in the exam? like yaml highlighting? does it paste code correctly without the stupid indentation problem I had before?

Hamza Belmellouki:
https://kodekloud.slack.com/archives/CDR9R5QRG/p1644392376598789

Hamza Belmellouki:
to solve that issue I had to configure :set paste in .vimrc

Hamza Belmellouki:
I am afraid of doing lots of minor environment configs upfront in the exam that could waste my time

Vitor Jr.:
The paste thing isn’t really a tmux related problem. It’s the default behavior for vim

Vitor Jr.:
I trained to define a lot of things when exam started

Hamza Belmellouki:
haha that’s what I am planning to do

Vitor Jr.:
When the exam started, for every host I was accessing through ssh, I did exactly the same:

Vitor Jr.:

echo 'alias k=kubectl
export do="--dry-run=client -o yaml"
export now="--force --grace-period 0"
export TERM=screen-256color' >> ~/.bashrc

echo 'set tabstop=2
set expandtab
set shiftwidth=2' >> ~/.vimrc

Hamza Belmellouki:
any thought on how to make these reusable. can I copy them from one host to another?