Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrsh7th/vim-eft
enhanced f/t
https://github.com/hrsh7th/vim-eft
nvim nvim-plugin vim vim-plugin
Last synced: 11 days ago
JSON representation
enhanced f/t
- Host: GitHub
- URL: https://github.com/hrsh7th/vim-eft
- Owner: hrsh7th
- Created: 2020-10-01T09:15:04.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-18T14:23:32.000Z (over 1 year ago)
- Last Synced: 2024-10-30T13:37:54.944Z (21 days ago)
- Topics: nvim, nvim-plugin, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 35.2 KB
- Stars: 75
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-eft
This plugin provides f/t/F/T mappings that can be customized by your setting.
# Usage
You can enable this plugin via following mappings.
```viml
nmap ; (eft-repeat)
xmap ; (eft-repeat)
omap ; (eft-repeat)nmap f (eft-f)
xmap f (eft-f)
omap f (eft-f)
nmap F (eft-F)
xmap F (eft-F)
omap F (eft-F)
nmap t (eft-t)
xmap t (eft-t)
omap t (eft-t)
nmap T (eft-T)
xmap T (eft-T)
omap T (eft-T)
```# Configuration
## highlight
```viml
" Disable highlight
let g:eft_highlight = {}" Custom highlight
let g:eft_highlight = {
\ '1': {
\ 'highlight': 'EftChar',
\ 'allow_space': v:true,
\ 'allow_operator': v:true,
\ },
\ '2': {
\ 'highlight': 'EftSubChar',
\ 'allow_space': v:false,
\ 'allow_operator': v:false,
\ },
\ 'n': {
\ 'highlight': 'EftSubChar',
\ 'allow_space': v:false,
\ 'allow_operator': v:false,
\ }
\ }
```## character matching
```viml
" You can pick your favorite strategies.
let g:eft_index_function = {
\ 'head': function('eft#index#head'),
\ 'tail': function('eft#index#tail'),
\ 'space': function('eft#index#space'),
\ 'camel': function('eft#index#camel'),
\ 'symbol': function('eft#index#symbol'),
\ }" You can use the below function like native `f`
let g:eft_index_function = {
\ 'all': { -> v:true },
\ }
```## DEMO
NOTE: This demo uses `Ff`, `fm` `fc` with this plugin's default configuration.