vi/vim tricks

vi or vim is a powerful text editor that comes installed by default in most Linux and Unix systems. You’ll find many tutorials online that’s get you started quickly. There’s also the command vimtutor that contains enough information for most day to day editing needs.

This blog post is for my reference and contains commands I found useful for specific tasks. These commands are relevant for Linux (all falvours) and MacOS terminal.

Setup vi/vim configuration
Delete blank lines
Remove duplicate lines
Join the line above after current line
How to join all lines together which match pattern

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu