Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuki-yano/vim-textobj-generics
https://github.com/yuki-yano/vim-textobj-generics
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuki-yano/vim-textobj-generics
- Owner: yuki-yano
- License: mit
- Created: 2023-01-15T02:54:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-15T03:51:12.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T18:44:08.247Z (2 months ago)
- Language: Vim Script
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-textobj-generics
Provides a textobj that handles generics.
This plugin depends on [vim-textobj-functioncall](https://github.com/machakann/vim-textobj-functioncall).
## Usage
```vim
" if disable default key mapping
let g:textobj_generics_no_default_key_mappings = v:true" with vim-sandwich
onoremap ig (textobj-generics-innerparen-i)
onoremap ag (textobj-generics-i)
let g:sandwich#recipes += [
\ {
\ 'buns': ['textobj#generics#input_generics()', '">"'],
\ 'expr': 1,
\ 'cursor': 'inner_tail',
\ 'kind': ['add', 'replace'],
\ 'action': ['add'],
\ 'input': ['g']
\ },
\ {
\ 'external': ['i<', "\(textobj-generics-a)"],
\ 'noremap': 0,
\ 'kind': ['delete', 'replace', 'query'],
\ 'input': ['g']
\ },
\ ]
```See: [sandwich, textobjでGenericsを扱う](https://scrapbox.io/vim-jp/sandwich,_textobj%E3%81%A7Generics%E3%82%92%E6%89%B1%E3%81%86)