vim

Vim Plugins Setup

Vim Plugins Setup

wretchedghost
Why Use Vim Plugins? In the Vim Basics series, we covered vanilla vim and how powerful it is right out of the box. And honestly, vanilla vim can handle 90% of your daily work as a sysadmin. But sometimes you want that extra 10% - better syntax highlighting, file navigation, or quality of life improvements that make your workflow even smoother. The key is not to go overboard. I’ve seen people install 30+ plugins and end up with a slow, bloated vim that defeats the purpose of using a lightweight editor in the first place.
Vim Basics: Part 3

Vim Basics: Part 3

wretchedghost
Building on the Basics Now that we know how to open a file, edit it, move around in it, and save it, let us now look into how we can tweak it. My post to part 1 of vim basics can be found here: https://blog.lanlocked.xyz/post/vim-basics-part-1/. Part 2 can be found here: https://blog.lanlocked.xyz/post/vim-basics-part-2. In this part, we’ll cover visual mode, text objects (which will change how you think about editing), and then dive into customizing vim with your .
Vim Basics: Part 2

Vim Basics: Part 2

wretchedghost
Welcome Back In Part 1, we covered the basics of opening vim, understanding normal and insert modes, and moving around with the hjkl keys. If you haven’t read that yet, I’d recommend starting there as we’ll build on those concepts. Now it’s time to tackle what might be the most infamous aspect of vim: how to actually save and exit the program. We’ll also dive into some useful editing commands that will start to show you why vim users are so passionate about this editor.
Vim Basics: Part 1

Vim Basics: Part 1

wretchedghost
Getting to know vim If you are looking for a way to get more efficient at editing configs and text then vim is what you are wanting. Even at its most basic interface with no added plugins, vim can help you manipulate a file with its efficient modes and commands. vim is not the easiest to learn, especially for beginners where often newbies trying it out for the first time find they are not even able to exit the program.
Vim Substitution

Vim Substitution

wretchedghost
vim substitution is one tool any advanced vim user should know. Basically, vim substitution is similar to search and replace used on other file editors but vim goes much further than just searching and replacing files and characters. For anyone who creates bash scripts and edits a ton of config files like myself, will attest to the need to comment and uncomment many lines at a time. I’ll start with the basic uses of substitution and go into the more meaty commands as we go along.
Save a File as Sudo Without Exiting Vim

Save a File as Sudo Without Exiting Vim

wretchedghost
I have often opened a file which I did not first run as sudo in vim, edited the file, then to only find out that it is in read-only mode. I would then have to close the file then re-open it as superuser then make the changes needed. I found this to be very frustrating and found out there are several ways to get the file edited by inserting commands in command-mode using vim.