The first thing we do is change the tab settings back to the default settings, then we check to see if the filetype is turned on and it is, but indent is no on.
We update the .vimrc file to turn on indent and set the tabs to 4 for Perl (.pl) documents.
We see something new here, hot to take the line the cursor is on to the top of the screen by pressing "zt"
We see the auto-indent feature works just like the indent feature, only we press equals instead of the angle-bracket
We can see where the auto-indent gets it rules by typing ":e $VIMRUNTIME/indent"
We can see the indent file used by typing ":scriptnames"
Lastly we auto-indent an entire .css file with the default tab settings after using tab settings of 4 for the Perl script.
See the complete Vim playlist at:
https://www.youtube.com/watch?v=1lzXr-MztOU
See the complete Vim playlist in a single video at:
https://www.youtube.com/watch?v=3G6kAEvbv2A
Website link:
https://thefrugalcomputerguy.com/linux/seriespg.php?ser=10002
5 Comments