mraza007 / blog

Currently hosted on vercel
https://blog-vert-iota.now.sh
MIT License
0 stars 0 forks source link

2023/vim-onliners/ #4

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

My Favorite Vim Oneliners For Text Manipulation | Muhammad

A list of simple vim oneliners which helps you edit your text faster

https://muhammadraza.me/2023/vim-onliners/

kiuhbit commented 1 year ago

Nice blog post.

Vim actually already has a built-in word count feature with g ctrl-g. It even works for a visual selection.

You could also jq instead of the python tool if you have it installed: :%!jq

zsoltika commented 1 year ago

Deleting empty lines can be done with :%v/./d

DanielVZ96 commented 1 year ago

Today at work i learned about the join command. For example :%join removes all newlines in the file.

mraza007 commented 1 year ago

That's really cool

bronzehedwick commented 1 year ago

Deleting empty lines can be done with :%v/./g

I think this is :%v/./d

zsoltika commented 1 year ago

Deleting empty lines can be done with :%v/./g

I think this is :%v/./d

You are right, I had edited my comment.