justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.18k stars 64 forks source link

dont use internal function for mapping #104

Open bounceme opened 6 years ago

bounceme commented 6 years ago

https://github.com/justinmk/vim-dirvish/blob/e4b3c4b62d0ddb2d24aa8f9fcf3820f6d6de4ebf/ftplugin/dirvish.vim#L20

https://github.com/bounceme/remote-viewer/blob/master/plugin/remotedir.vim#L88

It makes it simpler to have :Dirvish used there for the external scripts like the one above ^

justinmk commented 6 years ago

Is that going to work for a and o?

bounceme commented 6 years ago

so a|o is basically: split, make dir listing buffer without using cache?

bounceme commented 6 years ago

what about: https://github.com/justinmk/vim-dirvish/blob/e4b3c4b62d0ddb2d24aa8f9fcf3820f6d6de4ebf/ftplugin/dirvish.vim#L23

changed to (something like): execute 'nnoremap '.s:nowait.'<buffer><silent> o :<C-U>exe "split +edit\\" fnameescape(getline("."))<bar>wincmd p<cr>'

justinmk commented 6 years ago

That won't work if multiple files are selected, specially if any fail to open.

I think adding hooks to override behavior would make more sense.