Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim: gp over the paragraph

Tags:

vim

paragraph

in vim I use

Vj..jgp

or

Vk..kgp

for selected a paragraph and format.
how I can selected and format more fast the paragraph ?

like image 333
JuanPablo Avatar asked Jul 01 '26 07:07

JuanPablo


1 Answers

As El Isra suggests in the comments, you can do gqap instead of vapgq to avoid unnecessarily going to visual mode. Some other useful variants of ap include aw (select a word) as (select a sentence), ab (select a () block), and aB (select a {} block). There are a number of plugins that extend this functionality for HTML tags as well, so you may be interested in searching for those.

Edit: Changed V to v.

Edit 2: Changed vgaqp to gqap.

like image 199
void-pointer Avatar answered Jul 04 '26 04:07

void-pointer