10 Daily Linux Questions and Answers Series (part 6)
Alex Enson

Alex Enson @alexenson

About: I am an experienced IT professional that has been in the IT industry for many years and wish to further my career in the cloud industry and believe it is the future of IT.

Location:
UK
Joined:
Apr 5, 2025

10 Daily Linux Questions and Answers Series (part 6)

Publish Date: Apr 17
0 0

In this brief article, I present 10 essential Linux questions along with their answers.
This foundational knowledge is crucial for anyone seeking to master Linux.

VIM (Visual Display Editor Improved) (continued)
Q1: How do you split the Vim window and work with multiple files?
:split filename
Use :vsplit for vertical split.

Q2: How do you save and exit Vim?
• To save and exit:
:wq
• To exit without saving:
:q!

Q3: How do you search for a word in Vim?
/text_to_search

Q4: How do you comment multiple lines in Vim?
Use :normal mode and add # or comment characters. For example:
:normal I#

Q5: How do you execute shell commands from Vim?
:!command

Q6: How do you auto-indent a file in Vim?
gg=G

Q7: How do you convert tabs to spaces in Vim?
:set expandtab

Q8: How do you highlight all occurrences of a word in Vim?
:vimgrep /word/ *

Q9: How do you remove highlighting in Vim?
vim
:noh

Q10: How do you record and replay a macro in Vim?
• To start recording:
q(register)
• To stop recording:
q
• To replay the macro:
@(register)


Stay tuned for part 7 coming tomorrow!

Connect with me on LinkedIn


#30DaysLinuxChallenge #RedHatEnterpriseLinux
#CloudWhistler #CloudEngineer #Linux
#DevOps #RedHat #OpenSource
#CloudComputing #Automation
#CloudEngineer

Comments 0 total

    Add comment