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

dont use internal function for mapping #104

Open
bounceme opened this issue Jan 5, 2018 · 4 comments
Open

dont use internal function for mapping #104

bounceme opened this issue Jan 5, 2018 · 4 comments

Comments

@bounceme
Copy link
Contributor

bounceme commented Jan 5, 2018

execute 'nnoremap '.s:nowait.'<buffer><silent> i :<C-U>.call dirvish#open("edit", 0)<CR>'

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
Copy link
Owner

justinmk commented Jan 5, 2018

Is that going to work for a and o?

@bounceme
Copy link
Contributor Author

bounceme commented Jan 5, 2018

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

@bounceme
Copy link
Contributor Author

bounceme commented Jan 6, 2018

what about:

execute 'nnoremap '.s:nowait.'<buffer><silent> o :<C-U>.call dirvish#open("split", 1)<CR>'

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

@justinmk
Copy link
Owner

justinmk commented Jan 6, 2018

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.

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

2 participants