Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrsh7th/vim-eft

enhanced f/t
https://github.com/hrsh7th/vim-eft

nvim nvim-plugin vim vim-plugin

Last synced: 8 days ago
JSON representation

enhanced f/t

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

Usage

NOTE: This demo uses `Ff`, `fm` `fc` with this plugin's default configuration.