sjbach / lusty

LustyExplorer / LustyJuggler for Vim
http://www.vim.org/scripts/script.php?script_id=1890
257 stars 30 forks source link

'dd' can't delete a line anymore after call ':LustyJuggler' for file switching #16

Closed Aaron2Ti closed 13 years ago

Aaron2Ti commented 13 years ago

'dl', 'dh', 'dj' and '3dk' not work too but 'dw' and '2dw' work like before

sjbach commented 13 years ago

Hmm, I'm unable to reproduce. What do you get by running these after closing lusty juggler:

:map dd :map dj :map dw

I'm guessing dd, etc. don't work for you because they're keys on the home row, which gets remapped by lusty juggler, while dw does work because 'w' isn't on the home row. But not sure why.

Aaron2Ti commented 13 years ago

I got v d * :YRDeleteRange 'v' seems it's yankring's problems, not juggler thanks your tips and response

Aaron2Ti commented 13 years ago

is it possible that yankring conflict with juggler? there's no such problem when only using one of them

sjbach commented 13 years ago

Someone else had a problem with yankring earlier:

https://github.com/sjbach/lusty/issues/closed#issue/9

Perhaps the workaround to that issue wasn't comprehensive enough.

tonysyu commented 13 years ago

For what it's worth, I have this same issue. The problem only occurs after calling LustyJuggler for the first time (i.e. not on start up). When I remove YankRing, the problem disappears.

:map dd returns

v  d           * :YRDeleteRange 'v'<CR>
o  d           * YRMapsExpression("<SNR>33_", "d") 
sjbach commented 13 years ago

I wish I could help, but it's a limitation in Vim. There's an open TODO for it in Vim's todo.txt:

maparg() doesn't return the flags, such as <buffer>, <script>, <silent>.
These are needed to save and restore a mapping
Also: the rhs string is not always correct. (Hari Krishna Dara, 2009 Sept 29)

Until it gets fixed, plugins which remap keys in this way will continue to conflict with LustyJuggler.

Aaron2Ti commented 13 years ago

I neglected YankRing, vim's default registers worked well too

tonysyu commented 13 years ago

Thanks to you both. I wasn't really using YankRing very often, anyway.

Any chance that this can be added as "Known Issue" in juggler-vim.writeup/vim.org?

sjbach commented 13 years ago

Good call, I added a note.

chibicode commented 12 years ago

@Aaron2Ti @tonysyu I suggest you guys to check out MinYankRing. This is a minimalistic implementation of yankring which does not overwrite built-in commands.