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

EasyMotion symbols not displayed inside Dirvish #51

Closed
adambiggs opened this issue May 26, 2016 · 12 comments
Closed

EasyMotion symbols not displayed inside Dirvish #51

adambiggs opened this issue May 26, 2016 · 12 comments

Comments

@adambiggs
Copy link

In Dirvish buffers, EasyMotion symbols don't show up:
screen shot 2016-05-26 at 11 30 46 am

It should look something like this:
screen shot 2016-05-26 at 11 32 19 am

@justinmk
Copy link
Owner

Could be a "conceal" conflict, assuming you're on a recent version of Vim and easymotion. What happens when you use easymotion in a help buffer?

@adambiggs
Copy link
Author

Seems to work fine in help buffers:
screen shot 2016-05-26 at 3 35 05 pm

@justinmk
Copy link
Owner

It looks like you're using an easymotion invocation to label the start of each line? The first part of each line in a dirvish buffer is hidden by conceal. Try :set conceallevel=0, then what gets labeled?

I'm not even sure if Vim has a way to search non-concealed text, so fixing this may require a change to Vim.

@adambiggs
Copy link
Author

The first part of each line in a dirvish buffer is hidden by conceal.

Ah that makes sense.

:set conceallevel=0 fixed the issue... but also makes dirvish look pretty ugly. I guess there's not much I can do in this case.

@adambiggs
Copy link
Author

I take it back! let g:dirvish_relative_paths = 1 fixed the issue since there's nothing to conceal anymore. 😄

@adambiggs
Copy link
Author

Sorry, have to take it back again... The above fix works in the project root directory, but as soon as i traverse into a subdirectory the issue comes back. 😢

@justinmk
Copy link
Owner

I am not aware of any Vim feature that allows a plugin to "skip" concealed (or otherwise non-displayed) characters. This is needed for plugins like easymotion and vim-sneak.

@adambiggs
Copy link
Author

Would it be possible to add a non-concealed whitespace character in front of each line?

@justinmk
Copy link
Owner

justinmk commented May 27, 2016

Not sure what you mean. Whitespace won't help easymotion label anything.

One potential approach would be to provide an option that forces CWD via :lcd, which would make g:dirvish_relative_paths do what you wanted. This would also potentially help with resolving #19. It could be disorienting for some users though.

@desjardinsm
Copy link

desjardinsm commented May 27, 2016

It's kind of a hacky workaround, but you could maybe do something with (even temporarily) setting g:EasyMotion_startofline = 0 and moving the cursor $T/

@adambiggs
Copy link
Author

Thanks for pointing me in the right direction @desjardinsm!

Everything seems to be working great after remapping easymotion with $T/:

let g:EasyMotion_startofline = 0

autocmd FileType dirvish
  \ map <buffer> <Leader>j $T/<Plug>(easymotion-j) |
  \ map <buffer> <Leader>k $T/<Plug>(easymotion-k)

@justinmk
Copy link
Owner

This works OK in vim-sneak since justinmk/vim-sneak@c2cbcf7 .

It should work in EasyMotion also. If it doesn't, file the bug with EasyMotion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants