sponsor Vim development Vim logo Vim Book Ad

textobj-verticalbar : Text objects for vertical bar

 script karma  Rating 1/1, Downloaded by 851  Comments, bugs, improvements  Vim wiki

created by
John Yanagiya
 
script type
utility
 
description
textobj-verticalbar is a Vim plugin to provide text objects to select wiki's table cell.

For example, if the content of a buffer as follows:
(here "*" means the cursor)

|| Header 1*|| Header 2 || Header 3 ||
|| Row1 || Cell1-2 || Cell1-3 ||
|| Row2 || Cell2-2 || Cell2-3 ||


|<Plug>(textobj-verticalbar-a)| will select columns as follows:
(here "<" and ">" indicates the selected range)

||<Header 1>|| Header 2 || Header 3 ||
|| Row1 || Cell1-2 || Cell1-3 ||
|| Row2 || Cell2-2 || Cell2-3 ||

|<Plug>(textobj-verticalbar-i)| will select columns as follows:
(here "<" and ">" indicates the selected range)

|<| Header 1 |>| Header 2 || Header 3 ||
---------
|| Row1 || Cell1-2 || Cell1-3 ||
|| Row2 || Cell2-2 || Cell2-3 ||

Requirements:
- Vim 7.2 or later
- textobj-user 0.3.7 or later (vimscript#2100)

 
install details
Download textobj-verticalbar-*.zip, and extract your ~/.vim directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
textobj-verticalbar_0.0.3.zip 0.0.3 2009-10-09 7.0 John Yanagiya Fixed bug with multi-byte characters.
textobj-verticalbar-0.0.2.zip 0.0.2 2009-06-16 7.2 John Yanagiya Initial upload
ip used for rating: 216.73.216.46

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github