LucHermitte / local_vimrc

Per project/tree configuration plugins
GNU General Public License v3.0
125 stars 7 forks source link

Add explanation to menu when opening vim #20

Open artfulrobot opened 3 years ago

artfulrobot commented 3 years ago

I opened a file in vim in a project that uses this and was confused as I was given a Yes/No/Always/Never prompt - but with no context? What is the question to which those are options?

image

After going through all of my plugins I found it was this one. I think the missing question is "Found _vimrm_local.vim, do you want to run it?"

LucHermitte commented 3 years ago

Sorry for my extremely late answer.

Do you remember whether you had multiple splits (windows)? Normally you should see the question in the command line and all the choices in the window status line. Which is not ideal :(

I should be able to improve the status line message by displaying the question there as well on

:echo lh#ui#confirm('Do you want to XXXXXX ?', "&Yes\n&No\n&Always\nNe&ver", 1)
artfulrobot commented 3 years ago

Thanks for getting back, no need to apologise, I'm grateful to you for your contribution to open sourceness!

I just reinstalled this plugin in nvim 0.5.0 with

Plug 'LucHermitte/lh-vim-lib'  
Plug 'LucHermitte/local_vimrc' 

Observations

Hope that's helpful

LucHermitte commented 3 years ago

opening with just vim: it does not find my _vimrc_local.vim

As this point this is somewhat normal as the local vimrc is sourced only on named buffers. I think it could be changed though.

opening with multiple splits vim -o *.md: it gives me this option for every split. Then it seems to give me the options again for each split, but this time without a nice menu. This gets a bit cyclical.

Indeed. 'Yes' choice should have remembered the choice for the current buffer at least. Only 'always' validates the local vimrc for all matching buffers.

EDIT: I've changed the default to "Always", and I've renamed "Yes" choice "Once"