Skip to content

[Feature Request] Add g:lexima_manually_keys #132

@4513ECHO

Description

@4513ECHO

Motivation

lexima binds mapping automatically in lexima#add_rule().
But it sometimes comes into conflict with other plugins or configs.
We want the way to avoid this problem.

Feature Overview

We can define g:lexima_manually_keys which is list of keys. lexima does not bind to these keys. Users have to use lexima#expand() by thereselves.

Example is here:

let g:lexima_manually_keys = ['$', '<CR>']

call lexima#add_rule({ 'char': '$', 'some': 'config })
call lexima#add_rule({ 'char': '<CR>', 'some': 'config })

inoremap <expr> $ DollarFunc()
cnoremap <expr> <CR> CRFunc()

function! DollarFunc() abort
  if some#condition()
    return some#function()
  endif
  return lexima#expand('$', 'i')
endfunction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions