Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing mapping for r #283

Open
mikehaertl opened this issue Jul 18, 2023 · 0 comments
Open

Missing mapping for r #283

mikehaertl opened this issue Jul 18, 2023 · 0 comments

Comments

@mikehaertl
Copy link

The documentation states:

We borrowed the aliases `r` and `a` from the |surround| plugin by Tim Pope.

But r is not working for me. It's also not listed in the defaults:

targets.vim/doc/targets.txt

Lines 727 to 763 in 642d3a4

This function can be used to modify an internal dictionary used to control the
mappings. The default value of that dictionary is:
{~
\ '(': {'pair': [{'o': '(', 'c': ')'}]},~
\ ')': {'pair': [{'o': '(', 'c': ')'}]},~
\ '{': {'pair': [{'o': '{', 'c': '}'}]},~
\ '}': {'pair': [{'o': '{', 'c': '}'}]},~
\ 'B': {'pair': [{'o': '{', 'c': '}'}]},~
\ '[': {'pair': [{'o': '[', 'c': ']'}]},~
\ ']': {'pair': [{'o': '[', 'c': ']'}]},~
\ '<': {'pair': [{'o': '<', 'c': '>'}]},~
\ '>': {'pair': [{'o': '<', 'c': '>'}]},~
\ '"': {'quote': [{'d': '"'}]},~
\ "'": {'quote': [{'d': "'"}]},~
\ '`': {'quote': [{'d': '`'}]},~
\ ',': {'separator': [{'d': ','}]},~
\ '.': {'separator': [{'d': '.'}]},~
\ ';': {'separator': [{'d': ';'}]},~
\ ':': {'separator': [{'d': ':'}]},~
\ '+': {'separator': [{'d': '+'}]},~
\ '-': {'separator': [{'d': '-'}]},~
\ '=': {'separator': [{'d': '='}]},~
\ '~': {'separator': [{'d': '~'}]},~
\ '_': {'separator': [{'d': '_'}]},~
\ '*': {'separator': [{'d': '*'}]},~
\ '#': {'separator': [{'d': '#'}]},~
\ '/': {'separator': [{'d': '/'}]},~
\ '\': {'separator': [{'d': '\'}]},~
\ '|': {'separator': [{'d': '|'}]},~
\ '&': {'separator': [{'d': '&'}]},~
\ '$': {'separator': [{'d': '$'}]},~
\ 't': {'tag': [{}]},~
\ 'a': {'argument': [{'o': '[([]', 'c': '[])]', 's': ','}]},~
\ 'b': {'pair': [{'o':'(', 'c':')'}, {'o':'[', 'c':']'}, {'o':'{', 'c':'}'}]},~
\ 'q': {'quote': [{'d':"'"}, {'d':'"'}, {'d':'`'}]},~
\ }~

I had to add it with:

autocmd User targets#mappings#user call targets#mappings#extend({
    \ 'r': {'pair': [{'o':'[', 'c':']'}]}
    \ })

So I think either the docs should be updated or the mapping added.

There's also a little typo (incude) here:

|targets-quote-seek|. Unlike Vim's quote text objects, this incudes no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant