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

move to the end of selected Visual area #353

Closed
wants to merge 1 commit into from
Closed

move to the end of selected Visual area #353

wants to merge 1 commit into from

Conversation

tanloong
Copy link

@tanloong tanloong commented Nov 17, 2022

After SlimeRegionSending, the cursor stays at the start of the selected Visual area. Moving the cursor to the end side would be helpful. It will allow us to just continue to select and send lines that come after.

@jpalardy
Copy link
Owner

hi @tanloong

Thanks for pitching in!

Is it possible to do this in a mapping instead? Does it belong (as the default behavior) in the slime logic?

@tanloong
Copy link
Author

tanloong commented Nov 21, 2022

Thanks for replying!

The reason that I didn't choose the mapping way is that I don't know how to, although there have already been a related #331.

I tried xmap <F5> <Plug>SlimeRegionSend|'> in nvim, but got E20: Mark not set.

If there is a mapping doing the same thing, I am happy to use it. Otherwise letting slime itself do it, in default, fits me, with, from your point of view, the cost of the slime logic. In that regard, I will use my fork if the change is not for vim-slime.

So, how can I map this behavior? Or how should I modify the above mapping?

Excuse me if the language looks strange. I am not a native speaker.

@jpalardy
Copy link
Owner

Hi @tanloong

Although it's not exactly the same, I've used this binding to navigate after sending a paragraph.

Also, I just tried:

# mnemonic: end
vmap ,e <c-c><c-c>`>

which seems to work (if I understand what you were trying to do)

Let me know if that helps 😄

@tanloong
Copy link
Author

tanloong commented Nov 23, 2022

It works! I use this:

vim.keymap.set('x', '<F5>', '<c-c><c-c>`>', {remap=true}) -- written in lua

vimscript equivalent:

xmap <F5> <c-c><c-c>`>

Thanks!

@tanloong tanloong closed this Nov 23, 2022
@jpalardy
Copy link
Owner

Happy to hear that ^

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

Successfully merging this pull request may close these issues.

2 participants