Coder Social home page Coder Social logo

Comments (11)

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

Rnvimr will automatically make ranger to open the file in neovim. I think this is your installation issue.

  1. What's the :checkhealth rnvimr output in Neovim console?

  2. What's the message output in ranger when input :eval os.getenv('VISUAL') in console inside Ranger?

from rnvimr.

thepenguinthatwants avatar thepenguinthatwants commented on June 2, 2024

Hi sorry! It seems to work.

Seems like its not possible to make it work like tpope vinegar plugin that it start it closes the window when I've opened a file?

from rnvimr.

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

:h rnvimr

g:rnvimr_pick_enable
    Default: 0

    Enable Ranger to be hidden after picking a file.
    It will automatically attach file in next |:RnvimrToggle|.

from rnvimr.

thepenguinthatwants avatar thepenguinthatwants commented on June 2, 2024

Hi!

Now I get it.. sorry I usually just create new empty files in ranger.

Seems like this works right if the files are not empty. Tho its a bug in that part that it opens up empty files inside the small window.

from rnvimr.

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

ranger open file using rifle. Already stated in the readme.

Q: Couldn't open some special type of files by using Enter or l in Ranger.
A: Please follow below steps to solve this issue:
The behavior of openning the file in Ranger depends on rifle.conf. Press r to make sure that the ${VISUAL:-$EDITOR} -- "$@" is the best candidate in Ranger.
If the case 1 is false, change the code in rifle.conf like that:
-!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
+!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php|your_file_type = ${VISUAL:-$EDITOR} -- "$@"
execute:RnvimrSync to synchronize the rifle.conf just modified with Rnvimr.

If you want to open an empty file using ${VISUAL:-$EDITOR} -- "$@", you should change your rule of rifle.

from rnvimr.

thepenguinthatwants avatar thepenguinthatwants commented on June 2, 2024

OOh thanks. Sorry I somehow didnt get that earlier.

Is there also a way if I have multiple buffer in same window and open a file by rnvimr, is it possible to leave other buffer untouched and only change the current one?

from rnvimr.

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

Sorry for my inability to understand what you mean. Please explain clearly to me.

from rnvimr.

thepenguinthatwants avatar thepenguinthatwants commented on June 2, 2024

When I make a buffer split with and open rnvimr to choose a file to open. It open up in the whole window instead of the chosen buffer.

from rnvimr.

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

Do you mean all buffers in nvim' window open the same file chose by ranger? If yes, I can't reproduce your issue.
Please try a mini.vim like this:

call plug#begin('~/.config/nvim/plugged')
Plug 'kevinhwang91/rnvimr'
tnoremap <silent> <M-i> <C-\><C-n>:RnvimrResize<CR>
nnoremap <silent> <M-o> :RnvimrToggle<CR>
tnoremap <silent> <M-o> <C-\><C-n>:RnvimrToggle<CR>
call plug#end()

from rnvimr.

keevee09 avatar keevee09 commented on June 2, 2024

Hi, I have the same issue. When I run rnvimr within nvim and try to open the file in nvim,
it opens an instance of nvim in the rnvimr floating window rather than the running instance of nvim.
I am on xubuntu 18.04 with the latest neovim and ranger and a pyenv version of python3.7 in my shell.
When I run :checkhealth, health#rnvimr#check throws an error:
`ERROR: Failed to run healthcheck for "rnvimr" plugin. Exception: function health#check[21]..health#rnvimr#check[2]..154_check_python_ranger, line 7
Vim(let) :E688: More targets than List items.

OK, I have answered the problem as it pertains to myself:
rnvimr finds the apt installed (old) version of ranger and tries to use it. I uninstalled this and installed the python package with pip instead.
I have cloned your git repository and linked to ranger.py to run ranger from the shell (because the Ubuntu Repository ranger is outdated).
Within nvim, the rnvimr looks for ranger and can't find this version --- the symlink to ranger.py is in ~/bin --- but it can find the pip install ranger-fm version which runs within nvim.

from rnvimr.

kevinhwang91 avatar kevinhwang91 commented on June 2, 2024

Hi, I have the same issue. When I run rnvimr within nvim and try to open the file in nvim,
it opens an instance of nvim in the rnvimr floating window rather than the running instance of nvim.
I am on xubuntu 18.04 with the latest neovim and ranger and a pyenv version of python3.7 in my shell.
When I run :checkhealth, health#rnvimr#check throws an error:
`ERROR: Failed to run healthcheck for "rnvimr" plugin. Exception: function health#check[21]..health#rnvimr#check[2]..154_check_python_ranger, line 7
Vim(let) :E688: More targets than List items.

OK, I have answered the problem as it pertains to myself:
rnvimr finds the apt installed (old) version of ranger and tries to use it. I uninstalled this and installed the python package with pip instead.
I have cloned your git repository and linked to ranger.py to run ranger from the shell (because the Ubuntu Repository ranger is outdated).
Within nvim, the rnvimr looks for ranger and can't find this version --- the symlink to ranger.py is in ~/bin --- but it can find the pip install ranger-fm version which runs within nvim.

@keevee09
Specify your Ranger path to g:rnvimr_ranger_cmd.

g:rnvimr_ranger_cmd
Default: 'ranger'
Use this command to run a process inside the floating window.
It can mix some command of Ranger, such as 'ranger --cmd="xxx"'.

from rnvimr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.