https://github.com/spacewander/vim-textobj-lua
https://github.com/spacewander/vim-textobj-lua
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spacewander/vim-textobj-lua
- Owner: spacewander
- License: gpl-3.0
- Created: 2017-02-27T15:17:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T02:05:33.000Z (over 9 years ago)
- Last Synced: 2025-04-12T07:39:30.035Z (over 1 year ago)
- Language: Python
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-textobj-lua - Provide text objects for Lua code
[](https://travis-ci.org/spacewander/vim-textobj-lua)
## Requirement
[vim-textobj-user](https://github.com/kana/vim-textobj-user)
## Usage
This plugin add following key mappings defined in Visual mode and Operator-pending mode.
#### \(textobj-lua-block-a)
Default:
```
omap al (textobj-lua-block-a)
xmap al (textobj-lua-block-a)
```
Select a Lua block. More precisely, it selects lines
belong to:
- for...do...end block
- if...then...end block
- while...do...end block
- repeat...until... block
- function...end block
#### \(textobj-lua-block-i)
Default:
```
omap il (textobj-lua-block-i)
xmap il (textobj-lua-block-i)
```
Like `(textobj-lua-block-a)`, but it doesn't
include start and end marks.
#### \(textobj-lua-function-a)
Default:
```
omap af (textobj-lua-function-a)
xmap af (textobj-lua-function-a)
```
Select a Lua function.
#### \(textobj-lua-function-i)
Default:
```
omap if (textobj-lua-function-i)
xmap if (textobj-lua-function-i)
```
Like `(textobj-lua-function-a)`, but it doesn't
include function definition and end mark.
#### \(textobj-lua-condition-a)
Default:
```
omap ac (textobj-lua-condition-a)
xmap ac (textobj-lua-condition-a)
```
Select a Lua condition region. More precisely, it selects
words contains:
- for...do
- if...then
- while...do
#### \(textobj-lua-condition-i)
Default:
```
omap ic (textobj-lua-condition-i)
xmap ic (textobj-lua-condition-i)
```
Like `(textobj-lua-condition-a)`, but it doesn't
include start and end marks like 'for', 'if' and so on.
For further reading, please `:vert help textobj-lua`.