Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 2.12 KB

README.org

File metadata and controls

64 lines (49 loc) · 2.12 KB

日本語: JA_README.org

Evil-textobj-parameter

This is evil version of sgur/vim-textobj-parameter.

Usage

First, you have to define key(see Keybindings). Explanation below assume that you configured along with it:

For those who familier with sgur/vim-textobj-parameter, this works almost the same except i2, isn’t provided.

Inner text object: evil-textobj-parameter-inner-parameter

evil-textobj-parameter-inner-parameter represents inner text object.

def foo(bar: int, baz: str, fizz: int): -> ():
        |<---->|  |<---->|  |<----->|

Outer text object: evil-textobj-parameter-outer-parameter

evil-textobj-parameter-outer-parameter represents outer text object.

def foo(bar: int, baz: str, fizz: int): -> ():
        |<------>|

def foo(bar: int, baz: str, fizz: int): -> ():
                |<------>|
def foo(bar: int, baz: str, fizz: int): -> ():
                          |<------->|

Configuration

Keybindings

By default, this package doesn’t provide any default keybinds. Rather, you define it yourself.

If you want to use it with the same keybind as original, you can copy this:

(define-key evil-inner-text-objects-map "," 'evil-textobj-parameter-inner-parameter)
(define-key evil-outer-text-objects-map "," 'evil-textobj-parameter-outer-parameter)
  

Installation

Currently, this package is distributed only on Github.

If you’re using conao3/leaf.el, you can do:

(leaf evil-textobj-parameter
  :el-get Cj-bc/evil-textobj-parameter
  :require t
  :config
  (define-key evil-inner-text-objects-map "," 'evil-textobj-parameter-inner-parameter)
  (define-key evil-outer-text-objects-map "," 'evil-textobj-parameter-outer-parameter)
  )