kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
804 stars 17 forks source link

Change default on enter behaviour #75

Closed fazibear closed 3 years ago

fazibear commented 3 years ago

How can I change default on enter behaviour. I can press ctl-t to open file in new tab, but I want to make enter open file in new tab. It it possible to configure plugin like this?

kevinhwang91 commented 3 years ago
let g:rnvimr_action = {
            \ '<CR>': 'NvimEdit tabedit'
            \ }

:h rnvimr_action for detail

fazibear commented 3 years ago

Is there an option to switch to existing tab if already opened?

kevinhwang91 commented 3 years ago

drop seemly doesn't work in rnvimr, I will fix it later.

kevinhwang91 commented 3 years ago

update the repo and

let g:rnvimr_action = {
            \ '<CR>': 'NvimEdit drop'
            \ }
hamensman commented 2 years ago

How would this be done with l key, which - when at a file - also opens it in ranger by default?

Because if I did it like this...

let g:rnvimr_action = {
            \ 'l': 'NvimEdit drop',
            \ '<CR>': 'NvimEdit drop'
            \ }

...then I can't use l to navigate around ranger :(

kevinhwang91 commented 2 years ago

How would this be done with l key, which - when at a file - also opens it in ranger by default?

Because if I did it like this...

let g:rnvimr_action = {
            \ 'l': 'NvimEdit drop',
            \ '<CR>': 'NvimEdit drop'
            \ }

...then I can't use l to navigate around ranger :(

Upgrade code and let g:rnvimr_edit_cmd = 'drop'

hamensman commented 2 years ago

How would this be done with l key, which - when at a file - also opens it in ranger by default?

Because if I did it like this...

let g:rnvimr_action = {
            \ 'l': 'NvimEdit drop',
            \ '<CR>': 'NvimEdit drop'
            \ }

...then I can't use l to navigate around ranger :(

Sorry, meant this:

let g:rnvimr_action = {
            \ 'l': 'NvimEdit tabedit',
            \ '<CR>': 'NvimEdit tabedit'
            \ }

So I'd want l to of course navigate as normal, but also open file in new tab (instead of in ranger popup)

kevinhwang91 commented 2 years ago

How would this be done with l key, which - when at a file - also opens it in ranger by default? Because if I did it like this...

let g:rnvimr_action = {
            \ 'l': 'NvimEdit drop',
            \ '<CR>': 'NvimEdit drop'
            \ }

...then I can't use l to navigate around ranger :(

Sorry, meant this:

let g:rnvimr_action = {
            \ 'l': 'NvimEdit tabedit',
            \ '<CR>': 'NvimEdit tabedit'
            \ }

So I'd want l to of course navigate as normal, but also open file in new tab (instead of in ranger popup)

Remove your g:rnvimr_action

hamensman commented 2 years ago

Remove your g:rnvimr_action

What do I then add instead?