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

'< and '> are not restored with right unit #58

Open
kana opened this issue Sep 25, 2017 · 5 comments
Open

'< and '> are not restored with right unit #58

kana opened this issue Sep 25, 2017 · 5 comments

Comments

@kana
Copy link
Owner

kana commented Sep 25, 2017

From: #56 (comment)

Perhaps semi-related: I'm noticing that when I specifically do a yie, the '< and '> marks are no longer what they should be if the last visually-selected area was character-wise (i.e. a word)

For example, vjjj<Esc>yaegv reselect the same region as vjjj but it is line-wise instead of character-wise.

@kana
Copy link
Owner Author

kana commented Sep 26, 2017

I've looked into the problem. It seems not to be possible to solve at the moment. Because vim-textobj-user internally uses v/V/<C-v> to select a proper region. So that the type of the last Visual mode (used by gv) is overridden. And there is no way to reset the type other than v/V/<C-v>… but these keys are not always available (especially for c).

@kana
Copy link
Owner Author

kana commented Sep 26, 2017

It might be possible to solve the problem by restructuring the internal of vim-textobj-user not to use Visual mode directly. But it takes a long time to complete.

@kana
Copy link
Owner Author

kana commented Sep 26, 2017

I'll try writing a prototype later: https://github.com/kana/vim-textobj-user/compare/prototype-to-keep-last-visual-mode

@kana
Copy link
Owner Author

kana commented Oct 2, 2017

Hmm… I spent several hours on the problem and realized that it's not possible to solve the problem unless writing a patch to Vim. It's necessary to use Visual mode in vim-textobj-user for repeatability with the . command.

@pianohacker
Copy link

pianohacker commented Nov 10, 2018

Reviving an old issue, but is the last comment true with tpope/vim-repeat installed?

If I understand correctly, the changes described would allow move-n and move-p to stay in visual mode. Is that true, or a separate issue?

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