Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

I'm writing more Ansible playbooks and yaml is such a big part of it. Although, I usually write playbooks in VSCode, for the RHCE (Red Hat Certified Engineer) exam, you'll rely on Vim exclusive (or nano, but that's not what I'm referring to).

Here are my .vimrc settings. Although there are other examples of .vimrc out there, this works for me. Here is an explanation of the settings.

syntax on

Turn syntax highlighting on according to the current value of fileType which in this case is yaml

Setting commands to be automatically executed when reading or writing a file.

fileType yaml

Setting vim to recognize yaml filetypes.

setlocal

Setting the local (not global) options in your current window/buffer.

Auto indent (ai) copies the indent from the current line when starting a new line.

Tabstop is the number of spaces that a tab counts for. ts=2 is 2 spaces in a tab.

Shift width is the number of spaces to use for each step of auto indent (ai).

Prints the line number in front of each line. This really makes it easier to troubleshoot errors.

Expand tab uses the appropriate number of spaces to insert a tab.

Shows the line that the cursor is on with horizontal line

Shows the column that the cursor is in. My favorite setting, tbh.

Sets the title of the terminal window to the name of the file you're currently editing.

vimrc

About

Current .vimrc settings especially for Ansible

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages