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

Disable special keys (lightspeed.nvim compatibility) #223

Closed
lordvidex opened this issue Apr 22, 2024 · 1 comment
Closed

Disable special keys (lightspeed.nvim compatibility) #223

lordvidex opened this issue Apr 22, 2024 · 1 comment

Comments

@lordvidex
Copy link

I've been using lightspeed for almost a year now and I've gotten used to the key combos I use to move around. The documentation has recommended migrating to leap.nvim but every now and then, there's friction with migration due to the issue below:

Problem

The special keys are probably nice for someone new to leap, but it's not convenient for my usecases while writing code. For example, in light speed dt<cr> will delete everything to the end of the current line but even after adding flit.nvim and setting all special keys to empty strings, I couldn't make this work as expected.
TLDR; and are very valid characters for my usecase that I don't want overridden, how can i configure this?

SideNote

My motivation for migration in the first place is the ease of configuration of leap compared to lightspeed. I have always wanted to unmap , because lightspeed overrides my <localleader> key.

@ggandor
Copy link
Owner

ggandor commented Apr 22, 2024

You can disable special keys by setting them to e.g. '' (empty string). Don't set them to nil thought, that would throw an error. If you want to target EOL with enter, add an equivalence class (opts.equivalence_classes = { '\r\n', ... }) - \r, i.e. enter will find \n, i.e. the newline character. But you should press enter twice then, there is no hardcoded EOL shortcut here in Leap, as opposed to Lightspeed. See :help leap-to-eol.

@ggandor ggandor closed this as completed May 20, 2024
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

2 participants