cancel
Showing results for 
Search instead for 
Did you mean: 
Zenia
Mission Specialist
Mission Specialist
  • 1,504 Views

VIM configuration during the exam

Jump to solution

Do you edit the vimrc as below during the exam so the YAML format would be compatible in the terminal when it is being pasted?

set et

set ai

set cuc

set ts=2

set paste

0 Kudos
2 Solutions

Accepted Solutions
Jcalvod
Flight Engineer
Flight Engineer
  • 1,494 Views

Hello Zenia,

Because of confidentially reasons is not possible to share information about the exam but reviewing your question I think that we can talk about usual configuration of vim that we use in order to make easier to copy and paste code without problems in yaml files as a generic manner (not specifically talking about the exam).

In my case when i have to work with yaml files and want to be sure that i will not have any problem my .vimrc contains this config:

setlocal ts=2 sts=2 sw=2 sws=2 et


 

View solution in original post

Travis
Moderator
Moderator
  • 1,468 Views

@Zenia -

I teach this course quite often and suggest an even mroe robust VIMRC. You can leave in or remove the RED BOLD CUC below, but I really like the color columns and have shown students how in a few seconds you can see things that have been indented incorrectly within a matter of seconds.

 

.vimrc file contents
autocmd FileType yaml setlocal ai ts=2 sw=2 et sts=2 cuc colorcolumn=3,5,7,9,11

Turning off / Disabling Color Column Guides:

:set colorcolumn=
or

:set cc=

Changing Colors

:highlight ColorColumn ctermbg=7

CUC in the VIM RC file provides a moving color column guide that follows the cursor.

 

I also have a larger resource that I share with students ...

https://github.com/tmichett/vimrc 

This is good to use in the course and in everyday development of playbooks as it can bring VSCode-like formatting and highlighting to VIM.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

5 Replies
Jcalvod
Flight Engineer
Flight Engineer
  • 1,495 Views

Hello Zenia,

Because of confidentially reasons is not possible to share information about the exam but reviewing your question I think that we can talk about usual configuration of vim that we use in order to make easier to copy and paste code without problems in yaml files as a generic manner (not specifically talking about the exam).

In my case when i have to work with yaml files and want to be sure that i will not have any problem my .vimrc contains this config:

setlocal ts=2 sts=2 sw=2 sws=2 et


 

Travis
Moderator
Moderator
  • 1,469 Views

@Zenia -

I teach this course quite often and suggest an even mroe robust VIMRC. You can leave in or remove the RED BOLD CUC below, but I really like the color columns and have shown students how in a few seconds you can see things that have been indented incorrectly within a matter of seconds.

 

.vimrc file contents
autocmd FileType yaml setlocal ai ts=2 sw=2 et sts=2 cuc colorcolumn=3,5,7,9,11

Turning off / Disabling Color Column Guides:

:set colorcolumn=
or

:set cc=

Changing Colors

:highlight ColorColumn ctermbg=7

CUC in the VIM RC file provides a moving color column guide that follows the cursor.

 

I also have a larger resource that I share with students ...

https://github.com/tmichett/vimrc 

This is good to use in the course and in everyday development of playbooks as it can bring VSCode-like formatting and highlighting to VIM.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Zenia
Mission Specialist
Mission Specialist
  • 1,456 Views

Thank you Travis. I just tried the contents - they look neat!

0 Kudos
  • 1,457 Views

Indeed, having to configure vim to use sensible defaults every single time has bugged me for years. Not only do I know many who keep doing this extra step as well, the settings tend to be roughly the same.

In fact, if VS Code-like formatting and highlighting is useful enough to be taught to students (perhaps for accessibility and usability reasons?? hint hint), it should be worthy of inclusion in the exam environment, and without need for rote memorization. Either make it the default or offer a few popular vimrc configs we can quickly swap in. That way we can concentrate on the exam proper and not lose extra time.

There are those of us for whom processing of information may be high yet ability to recall is low vs our peers, be that formally diagnosed or not. This also goes with a greater dependence on accessible and searchable documentation from one place, just like on the public-facing Red Hat sites. This should not be something we end up being penalized for, even as a side effect. (And, no, allowing for more time on the exam as an accommodation does nothing to improve one's recall abilities.)

I know it would mean a lot to many out there to see improved parity in both vim config and documentation usage! 

--
Ashley D'Andrea (they/she)
Travis
Moderator
Moderator
  • 1,439 Views

@jdandrea_redhat -

You are not wrong here as this is something I've asked for as we are looking to redesign the course. We don't teach certain utilities or even enforce the use of VIM so it is unlikely that we will provide this as part of the exam environment. However, one thing I have wanted to see to get in line with other Ansible courses is the inclusion of VSCode with the RH294 course and the corresponding EX294 exam. Red Hat provides the VSCode extension for Ansible and YAML and any people are familiar with and now use VSCode as an IDE. This would provide additional options without forcing or recommending one tool or method over another.

@jonsebastian and @bonnevil 

Our goal with instructor-led training is to provide options and hints/tools to enable success in the course and the exam. Obviously, a quick VIMRC like I've provided is good for course environment, but my Github repository with the actual VIM plugins is much better in the real-world and is accessible whereas it wouldn't be in a disconnected course/exam environment.

Bottom line, we provide multiple methods to edit files, nano, vim, gedit, emacs, whatever you want to use and there are default configurations that can be setup and leveraged, but no everyone uses the same defaults.So, only an editor like VSCode with the extension would be an option here.

Hope that helps

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.