Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is blockwise motion in vim?

Tags:

vim

vi

The cursor-motion section of vim online help (:h) has a section called: FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE, but it doesn't define BLOCKWISE before that. :h blockwise takes you to blockwise visual(ctrl-v) section.

Does blockwise mean plain visual mode and block the text selected using visual mode?

like image 228
Lavya Avatar asked Oct 15 '25 17:10

Lavya


1 Answers

I could be wrong but from my understanding, the help is referring to blockwise and blockwise visual as one and the same.

Linewise (using Shift+v):

Linewise selection in Vim

Characterwise (just using v):

Characterwise selection in Vim

and Blockwise (using Ctrl+v):

Blockwise selection in Vim


In terms of forcing a motion to be blockwise, consider a block selection with an insert at the beginning of the block:

Visual block insertion (using Ctrl+v to select the block and Shift+I to insert at the beginning).

enter image description here

You can see the help for the visual block insertion by typing

:h v_b_i
like image 174
Gordonium Avatar answered Oct 18 '25 17:10

Gordonium