GithubHelp home page GithubHelp logo

ranger.vim's People

Contributors

apenpfkkhm avatar divramod avatar enthudave avatar francoiscabrol avatar gauteh avatar hlidotbe avatar mar04 avatar michelesr avatar nitsas avatar theethernaut avatar wikimatze avatar zahyur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ranger.vim's Issues

RangerCurrentFileNewTab: possible to open in existing window (when existant)?

Hey, thx for the awesome plugin!
It really gave me a boost.

I am mostly using RangerCurrentFileNewTab as trigger.
Sometimes it happens, that the new file i am opening is already open in another tab.
The current behavior of RangerCurrentFileNewTab is, that it opens a new tab despite the fact, that the file is already open, so that i have two tabs for the same file.

I would prefer to let RangerCurrentFileNewTab trigger a jump to the already open tab.
Is that somehow possible with the current state of the plugin?

thx again!

Ranger isn't called when opening a directory (neovim)

Hi, I have the following config

let g:ranger_replace_netrw = 1          " open ranger when vim open a directory
let g:NERDTreeHijackNetrw = 0

however when I do :e . or :e my_dir I get a new buffer and the status message: "my_dir" is a directory.
When opening vim from the command line with nvim my_dir, I get the same thing but it also puts me in insert mode.

I am using neovim v0.2.2, python 2.7.14 and python 3.6.4, :Checkhealth is all Ok. Using macOS 10.13.2.

Relevant PR: #36

Filenames with spaces

The error swishes by so fast that I can't see what it says exactly, but when I choose a file in ranger to be opened in vim and the filename has one or more spaces in it, it errors out going back to vim without opening up a new buffer with the chosen file.

Opening PDFs

When trying to open PDF I get a new buffer with what seems to be a textual representation of all the data/metadata in the PDF. My desired behavior is that it would open the PDF using the appropriate program as ranger does normally (when called from command line).

bulkrename

I seem to be unable to perform a bulkrename. After selecting the desired files and :bulkrename %s the files are opened in regular buffers. Is it possible to perform this from within Vim -> Ranger?

Replace netrw

Would be nice to be able to disable netrw and have ranger handle opening directories.

How can I use it in fish shell?

After pressing leader+F, ranger opens nicely, moving between folders works nicely, but opening the file failes:
My output below powershell:

 TERMINAL  term://.//8234:ranger --choosefiles=/tmp/chosenfile --selectfile=""[-]                              [unix]  100% ☰   56/56 ㏑ :  1 
Error detected while processing function 10:                                                                                                  
line    4:                                                                                                                                    
E492: Not an editor command: ^[[36mfish config loaded^@                                                                                                           
Press ENTER or type command to continue         

^[[36m... is my welcome message in the shell, shell displays it when I open a new terminal, or when in tmux I create new terminals

Remap copy/paste

How can I remap copy/paste in Ranger?

The default is :

map yy copy
map pp paste

I would like to change it to Ctrl-C and Ctrl-v:

map <C-c> copy
map <C-v> paste

However, it does not work. Do you know why and how I can get it to work?

Bad buffer handling

When launching vim with vim ., selecting two files with space, and then pressing enter to open them (great feature btw), my up arrow keybindings (scroll the view up) is stolen, and it just takes me back to the empty buffer that I guess was temporarily meant for ranger. It has the name of the directory as a file name, and in the status line (the one where the :commands go) it says "~/blabla/dir" is a directory. This weirdness does not happen if I open ranger from within vim, let's say for example with a :RangerCurrentFile command - so only when :eing a directory. Maybe you know Franco, or maybe I can look into it myself.

PS I'm working from an iTerm2 terminal with tmux on OSX.
edit: just arrow <up> key, not down.

Small delay on file opening

I've noticed that it takes about 1-2 seconds from the moment you select a file in ranger and press <CR> to the moment when vim actually opens that file.

I'm running Neovim and I tried also running it without any plugin (nvim -u NONE) and sourcing ranger plugin manually (:so ranger.vim) but I still get the same behavior.

I get no delay when opening files using :edit or other methods (such as other plugins to find and open files).

Is that normal?

If not, have you got any suggestion to fix this problem?

Too many arguments for function: OpenRangerIn

On a clean install of Ubuntu 18.04 (vim version 8.0), I'm getting
E118: Too many arguments for function: OpenRangerIn
When trying to run :Ranger or f

ranger.vim is the only plugin installed, after vim-plug.

After loosing focus, ranger is just a text buffer

Hi,

after loosing focus, ranger is just a text buffer. Can you reproduce this?

NVIM v0.2.0-dev

Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"

Implement --selectfile functionality

The only reason i am using my own custom implementation of this functionality is because i really like the option of 1. opening ranger in the current working directory or 2. opening the current file's directory (and selecting the current file) using the --selectfile argument to ranger.

Would you perhaps be open to implementing this?

I did not create a PR because i do not know how you would like to implement it. I have done it like so (original code copied from http://ornicar.github.io/2011/02/12/ranger-as-vim-file-manager.html which does not exist anymore):

nmap <leader>r :call Ranger(1)<cr>
nmap <leader>R :call Ranger(0)<cr>

function! Ranger(cwd)
    let currentFile = expand("%:p")
    let rangerCallback = { 'name': 'ranger' }
    function! rangerCallback.on_exit(id, code)
        Bclose!
        try
            if filereadable('/tmp/chosenfile')
                exec system('sed -ie "s/ /\\\ /g" /tmp/chosenfile')
                exec 'argadd ' . system('cat /tmp/chosenfile | tr "\\n" " "')
                exec 'edit ' . system('head -n1 /tmp/chosenfile')
                call system('rm /tmp/chosenfile')
            endif
        endtry
    endfunction
    enew
    if a:cwd
        call termopen('ranger --choosefiles=/tmp/chosenfile', rangerCallback)
    else
        call termopen('ranger --choosefiles=/tmp/chosenfile --selectfile=' . currentFile, rangerCallback)
    endif
    startinsert
endfunction

ranger.vim doesn't open in the correct directory when launching from a buffer containing a file that was opened through a symlink

  • OS: MX Linux 17
  • NVIM v0.3.0-1029-g48967695c Build type: RelWithDebInfo.
  • Nvim configurations
  • ranger version: ranger-master 1.9.1
  • ranger configurations
  • Python version: 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]

I have tested with all the provided commands (except the ones for new tabs, because I don't use those), and every time I open a file that Nvim opened through a symlink, it defaults the some "~/auto" that I don't remember creating. I want it to open in the current file or in the current working directory, like it does with all the other files.****

ranger.vim breaks netrw

Having ranger.vim installed breaks netrw, the built in file explorer.

Running :Explore results in E492: Not an editor command: Explore.

See this stack overflow question.

Also, I have bclose.vim installed and set this in my vimrc:

let g:ranger_replace_netrw = 0

Issue still occurs.

It would be great to have the ranger functionality but still be able to do a quick :Explore, :Vexplore, or especially :Sex.

Support whitespace in names

This seems not to work with files/dirs with whitespaces in the name.

$ mkdir "FOO BAR"
$ vim FOO\ BAR/file
# in vim, do :Ranger
# It won't work
# now quit
# the following output has appeared:
File or directory doesn't exist: /home/elvis/FOO

Warning: Using ranger as a file launcher is deprecated

With the default command :Ranger, instead of Ranger opening, I get the following message instead:

Warning: Using ranger as a file launcher is deprecated.
Please use the standalone file launcher 'rifle' instead.

Interestingly enough, other commands like :RangerNewTab work just fine.

Ranger version: ranger-stable 1.8.1

ShortCut ctrl+H

I Can't understand why the shortcut doesn't work when I run the ranger in NeoVim. Shortcut is binded to showing hidden files in ranger .

how to go back ranger?

when I open a file from ranger use neovim, how can I go back to ranger like \q ?
if use :q, it will all exit.

I know we can use a map :Ranger but I am not sure my vim is open whether from ranger or shell,
If I open my vim from shell, \q to ranger make not sense.

Feature request: deleting file is not deleting buffer

I found out that when I had opened buffers, I moved files from one directory to another.
Vim was unaware of this and buffers of deleted files were still there. And this produced confusion.
Is there a way that after deleting or moving files buffers will be deleted aswell ?
It would be perfec also if fugitive will also know that files were deleted or moved.

Is that possible to implement this ? Ranger is just brilliant to manipulating files. It would be perfect to implement this well with vim

Fails to open files in neovim 0.2

After upgrading to Neovim 0.2 it appears this plugin has broken.

After either exiting ranger or trying to open a file with it exits with an error.

E118: Too many arguments for function: 16

The 16 increases by 1 on subsequent calls.

I am running Arch Linux, Neovim 0.2.0-1 from the official repos and ranger:

ranger-stable 1.8.1

Python 3.6.1 (default, Mar 27 2017, 00:27:06) 
[GCC 6.3.1 20170306]

Error detected while processing function 101

When opening a new file, I get the following error:

Error detected while processing function 101..<SNR>30_Bclose:
line   45:
E516: No buffers were deleted: bdelete! 6

The file is successfully loaded afterwards. In that case, don't you think that the error message must be suppressed if everything went fine? I'm using Neovim 0.1.2.

Image Preview

in the normal Ranger project there's image previews, is there a way to support that in this vim plugin?

How to open file in the same window in Vertical or Horizontal split ?

Hi I just can't figure it out how I can open another file that will be open vertically or horizontally in new window ? I checked ranger tab methond and that is working fine. But still could not find the way how to open file in new window without closing original file where ranger method was triggered. Maybe this was just not coded ?
Thanks !

Neovim-like incsearch

Hi, is it possible to enable Neovim-like search (incsearch) in Ranger? Basically It's a "search as you type", so the cursor automatically jumps to the best match while searching. Or, even better, maybe there is a way to make Ranger respect Vim seach options (incsearch, smartcase etc)?

Add support of custom command to open ranger

I want to modify command, that open ranger to open it with custom SHELL (to load .zshrc before ranger for aliases) and custom theme (because default theme look ugly in my vim) like this
SHELL=/home/bjorn/.config/ranger/rshell ranger --cmd "set colorscheme snow"

Ranger misaligned columns and rendering problem

Hi,

It seems that my ranger is constantly having problems rendering in alignment. This does not happen when I open it up outside of neovim. I will provide a screenshot below:

Ranger within neovim:
2018-06-11-215018_1280x800_scrot

Ranger by itself:
2018-06-12-202157_1280x800_scrot

The plugin that I am using from you has not been changed at all and I still get the same error when I try to call it without the functions you have created. Thank you!

Versions:
Arch Version: 4.16.13-2
NVIM version: v0.3.0
Ranger Version: 1.9.1
Python Version: 3.6.5
Terminal Emulator: Termite v13

Ranger open parent directory instead the current directory

With the new argument for ranger "--selectfile" when I try open current directory it opens the parent directory.

For example this is the current directory:
current_dir

When I open ranger.vim with the current directory command it opens the parent dir.
parent_dir

I have a fix for this on NVIM but I need to know if I'm not the only one with the problem to make a PR.

NVIM 0.2.0 - Custom Release Build
ranger-stable 1.8.1

Can't exit terminal mode after closing ranger (neovim)

Currently, when ranger exits (on file choose, or pressing q), neovim hangs in terminal mode. doesn't work, nor can I get it to return to normal mode at all. After some debugging, it seems that nvim somehow isn't aware that ranger is closed (or at least the rangerCallback.on_exit function is never being run), and I've no idea why. Is this an issue with my configuration? A blank init.vim with just this plugin has the same problem, so I'm totally stumped.

Caveat -- I am running ranger directly via a symlink to the ranger.py script, not from a system install.

Open ranger half screen

Currently it opens full screen, I believe it will be nice to open it somewhere bellow, so you can still see you working code, and navigate into a new file.

Help understanding this issue

Honestly, I am not sure this is an issue with the plugin. The only please I cannot get it to reproduce is inside of vim8. But in neovim the plugin looks like this:
18-02-21_06 06 51

I've tried removing all of ranger configurations, neovim configurations and nothing. Any ideas would be great!
Thanks for a great plugin!

Bad path when inside a terminal in Neovim

Hi,

Thank you for your work, I love using ranger inside Vim 👍
When I want to open ranger from a terminal in NeoVim (:te), I can't open it because the path is corrupted like this :

Inaccessible paths: ['/my/current/folder/term:/3653:/bin']

I guess it's not a wanted behavior... Any thought ?

MacVim freeze

When I try to :Ranger MacVim just hangs.
version 8.0 (124)

In neovim (iterm2) ranger doesn't honor vim/terminal colorscheme

When I launch ranger from within Vim 8 it honours my spacemacs theme (iterm is set to use spacemacs as is vim itself):

7___no_name__-vim__vim

When I launch ranger from within neovim it doesn't:

7___no_name__-nvim__python

I'm not sure why this is happening :/ Launching ranger from the command line also honors my spacemacs colorscheme. (both vim/nvim use the same vim config)

Neovim error: stty: stdin isn't a terminal^@

Thanks for this extension.
When I try to open a file from ranger.vim in neovim I get this error:

Error detected while processing function 328:
line    4:
E492: Not an editor command: stty: stdin isn't a terminal^@

Is there any workaround for it? I wonder why it doesn't happen for you.

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.