fmoralesc / vim-tutor-mode

interactive tutorials for vim
84 stars 4 forks source link

Can't move up in *.tutor files #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

I use the following mappings in my vimrc:

noremap j h
noremap k j
noremap l k
noremap ; l

:verbose map key for h and l shows the following:

   l           *@tutor#ForwardSkipConceal(v:count1)
        Last set from ~/.nvim/plugged/vim-tutor-mode/ftplugin/tutor.vim
   l           * k
        Last set from ~/.nvim/nvimrc

   h           *@tutor#BackwardSkipConceal(v:count1)
        Last set from ~/.nvim/plugged/vim-tutor-mode/ftplugin/tutor.vim
fmoralesc commented 9 years ago

Ah! I have that to skip over the concealed sections on normal mode. I'm writing a check to redirect the mappings in your scenario, gimme a sec.

ghost commented 9 years ago

I saw the commit message, but that fixes it for now.

fmoralesc commented 9 years ago

Commit 2e020a61e019bbd86bb498b5a9651de082f5fd15 should fix it entirely. Please confirm.

ghost commented 9 years ago

That works fine. At first glance, would there be any downside to wrapping the other mappings in that?

fmoralesc commented 9 years ago

I think it's best to keep those left in ftplugin/tutor.vim alone, because if they change, we would no longer have a common set of mappings for the links. Navigation is different.

That said, I'm not sure how it would work with the mappings in autoload/tutor.vim:tutor#SetSampleTextMappings().

ghost commented 9 years ago

I think I understand, anyways thanks for the fix. Feel free to close this.