How to select between brackets (or quotes or …) in Vim?

To select between the single quotes I usually do a vi' (“select inner single quotes”).

Inside a parenthesis block, I use vib (“select inner block”)

Inside a curly braces block you can use viB (“capital B”)

To make the selections “inclusive” (select also the quotes, parenthesis or braces) you can use a instead of i.

You can read more about the Text object selections on the manual, or :help text-objects within vim.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)