https://github.com/poetic/vim-textobj-javascript
vim text objects for javascript
https://github.com/poetic/vim-textobj-javascript
Last synced: 10 months ago
JSON representation
vim text objects for javascript
- Host: GitHub
- URL: https://github.com/poetic/vim-textobj-javascript
- Owner: poetic
- Created: 2015-08-19T04:14:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T00:47:43.000Z (almost 10 years ago)
- Last Synced: 2025-01-24T17:14:26.128Z (11 months ago)
- Language: VimL
- Size: 22.5 KB
- Stars: 7
- Watchers: 15
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
This plugin provides several handy text objects for javascript.
You need to install https://github.com/kana/vim-textobj-user first.
# Text Objects
- ac, ic (chunk)
A **chunk** is a block of code between the beginning of the line that
contains '{' and the end of the line that contains the paired '}'
```
// NOTE: the starting and ending of the object is surrounded by []
// A chuck can be a function definition
[f]unction () {
//...
}[]
[v]ar x = function () {
//...
}[]
// A chunk can be a hash key and value pair
var x = {
[a]: function () {
//...
}[]
```
- af, if (function)
TODO