Thanks for the answer Gary.
The problem is that I don't have this rifle.conf.

$ ranger --copy-config=rifle.conf
Unknown config file `rifle.conf'
$ ranger --copy-config=rifle
Unknown config file `rifle'

'locate rifle', does not give anything. I precise that I installed ranger
using the usual fedora repos.

In .config/ranger I have :
apps.py  apps.pyo  bookmarks  commands.py  commands.pyo  history  keys.py
keys.pyo  options.py  options.pyo  scope.sh  tagged

I tried to edit apps.py. I have this section where I just changer vim into
gvim -v, but it didn't work :
# Often a programs invocation is trivial.  For example:
#    vim test.py readme.txt [...]
# This could be implemented like:
#    @depends_on("vim")
#    def app_vim(self, c):
#        return tup("vim", *c.files)
# Instead of creating such a generic function for each program, just add
# its name here and it will be automatically done for you.
CustomApplications.generic('gvim -v', 'fceux', 'elinks', 'wine', 'zsnes',
'javac')




2013/8/28 Gary Johnson <[email protected]>

> On 2013-08-27, emma sculateur wrote:
> > Hello,
> >
> > I just started to use ranger. I think I'm going to love it, the only
> thing is :
> > when I open a file in vim with ranger, I can't access the x11 clipboard
> or the
> > selection. ==> I cannot yank/paste at all !
> >
> > For the X11 clipboard I have this in my vimrc :
> >             nmap <C-p> "+p
> >             nmap <C-y> "+yy
> >             vmap <C-d> "+d
> >             vmap <C-p> d$"+p
> >             vmap <C-y> "+y
> > and I have an alias that launch gvim -v instead of vim... I thought
> ranger
> > really launched vim instead of gvim -v, and I tried to change that in
> > rifle.conf as indicated in the man, but I can't find this file.
> >
> > For the selection buffer, it is more annoying, and I have no idea of how
> to
> > make it work.
>
> The reason you can't use the X11 clipboard is, as you suspected,
> that ranger is invoking vim, not "gvim -v" as your editor.
>
> Your alias works from your shell, but it is not exported to other
> programs run from that shell, so ranger does not see the alias.
>
> Personal configuration files such as rifle.conf are not created
> unless you ask them to be.  To get a copy of rifle.conf into your
> ~/.config/ranger directory, execute
>
>     ranger --copy-config=rifle
>
> Then open the file ~/.config/ranger/rifle.conf and search for
> EDITOR.  Change each instance of the string
>
>     "$EDITOR"
>
> to
>
>     gvim -v
>
> and save that file.  There should be three such instances.  The
> first one should now look like this:
>
>     mime ^text,  label editor = gvim -v -- "$@"
>
> That should do it.
>
> Regards,
> Gary
>
>
>

Reply via email to