markdown-drawer icon indicating copy to clipboard operation
markdown-drawer copied to clipboard

How to Toggle (Open/Close) the side window

Open lixueyi83 opened this issue 2 years ago • 3 comments

I really like your plugin and that's exactly what I have been looking for. I have modified g:markdrawer_goto='<CR>' and also added g:markdrawer_click='<2-LeftMouse>'so that I can either use 'Enter' key or left mouse double click toGoTo()` the corresponding line on the left markdown file window.

I am wondering it's better to have a MarkDrawerToggle function so that we can toggle between open and close, or to make it easier to better have one function called MarkDrawerClose so that I can also create the toggle function by ourselves.

Thanks very much! Eric

lixueyi83 avatar Jun 27 '23 18:06 lixueyi83

Take a look at PR 9 and see if that satisfies your requirements.

Scuilion avatar Jul 15 '23 21:07 Scuilion

You have a little typo error in your PR, the function name that mapped to the command is not the same as the function name defined. And after I fixed the naming, it does not work cause the ReuseWindow returns the false to me. This below simple dirty solution worked for me:

image

lixueyi83 avatar Dec 11 '23 17:12 lixueyi83

This got lost in my inbox. I've updated the pr with your suggestions.

Scuilion avatar Sep 06 '24 14:09 Scuilion