All Projects → romgrk → equal.operator

romgrk / equal.operator

Licence: other
A text-object for LHS/RHS of assignment.

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to equal.operator

vim-easydebugger
A VIM multi-language debugger plugin
Stars: ✭ 47 (+193.75%)
Mutual labels:  vim-plugin
vim-counterpoint
Cycle between file counterparts in vim or neovim.
Stars: ✭ 12 (-25%)
Mutual labels:  vim-plugin
denops-gh.vim
Vim/Neovim plugin for GitHub
Stars: ✭ 27 (+68.75%)
Mutual labels:  vim-plugin
auto-pairs
Vim plugin, insert or delete brackets, parentheses, and quotes in pairs
Stars: ✭ 109 (+581.25%)
Mutual labels:  vim-plugin
CommentFrame.vim
Add Comments in Frames to the file you're editing, or Comments aligned on the Right side of a line. Customizable!
Stars: ✭ 42 (+162.5%)
Mutual labels:  vim-plugin
denops-docker.vim
Manage Docker in Vim/Neovim
Stars: ✭ 48 (+200%)
Mutual labels:  vim-plugin
vim-win
🖼️ A Vim plugin for managing windows.
Stars: ✭ 48 (+200%)
Mutual labels:  vim-plugin
todo-vim
Simple todo plugin for vim
Stars: ✭ 24 (+50%)
Mutual labels:  vim-plugin
cosme.vim
Cosmetic color scheme for Vim
Stars: ✭ 63 (+293.75%)
Mutual labels:  vim-plugin
filestyle
filestyle is a Vim plugin that highlights unwanted whitespace and characters.
Stars: ✭ 30 (+87.5%)
Mutual labels:  vim-plugin
swifty-vim
⌨️ A Vim plugin for Swift which provides file detection, syntax highlighting, support for compiling and running tests, and optional support for formatting and linting tools.
Stars: ✭ 18 (+12.5%)
Mutual labels:  vim-plugin
vim-thematic
Alter Vim's appearance to suit your task & environ
Stars: ✭ 218 (+1262.5%)
Mutual labels:  vim-plugin
vim-tips-wiki
1500+ tips downloaded from Vim Tips Wiki, parsed and formatted to look and work like native Vim help files
Stars: ✭ 56 (+250%)
Mutual labels:  vim-plugin
vim-sage
Vim plugin for SageMath (Sage) mathematics software system
Stars: ✭ 17 (+6.25%)
Mutual labels:  vim-plugin
poet-v
Vim Meets Poetry and Pipenv Virtual Environments
Stars: ✭ 57 (+256.25%)
Mutual labels:  vim-plugin
vim-textobj-sentence
Improving on Vim's native sentence text object and motion
Stars: ✭ 92 (+475%)
Mutual labels:  vim-plugin
vim-swap
Easy swapping of text in Vim
Stars: ✭ 18 (+12.5%)
Mutual labels:  vim-plugin
vim-gnote
make your mailbox as a note place
Stars: ✭ 16 (+0%)
Mutual labels:  vim-plugin
DidYouMean
Vim plugin which asks for the right file to open
Stars: ✭ 82 (+412.5%)
Mutual labels:  vim-plugin
uxntal.vim
Uxntal support for Vim
Stars: ✭ 32 (+100%)
Mutual labels:  vim-plugin

LHS/RHS operator

A text object for the LHS or RHS of the equal-sign (or colon).

//                                 al
//      ah      |----------------------------------------|
//  |-----------|
//      ih                         il
//  |---------|   |--------------------------------------|
    const value = [ { id: 42, text: 'alomeeaqswabwzix' } ]

Usage (default mappings):

Mode Mapping Effect
operator, visual il select inside RHS
operator, visual ih select inside LHS
operator, visual al select all RHS
operator, visual ah select all LHS

Configure your own mappings as such:

let equal_operator_default_mappings = 0

omap =h <Plug>(operator-lhs)
omap =l <Plug>(operator-Lhs)
omap =H <Plug>(operator-rhs)
omap =L <Plug>(operator-Rhs)

vmap =h <Plug>(visual-lhs)
vmap =l <Plug>(visual-rhs)
vmap =H <Plug>(visual-Lhs)
vmap =L <Plug>(visual-Rhs)

Demo

demo

Support

This plugin uses a pattern to match the following lines:

let lhs = rhs()

Lhs->Rhs("rhs");

lhs = Rhs->Rhs("rhs");

let lhs += 'rhs'

     lhs => "rhs"

let lhs >>= 'rhs'

return rhs

License

Same as JSON as far as I'm concerned, but most of the code here is freely adapted from Learn Vimscript the Hard Way. (eternal thanks to Steve Losh)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].