You are not logged in.

#1701 2013-04-24 09:15:06

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Ranger, a textbased filemanager

Hi and yea I know I was just here the other day, but I wrote a command that opens feh in thumb mode in the commands file as

class th(Command):
    def execute(self):
        self.fm.run(["feh",  "--thumbnails",  "--thumb-width 120",  "--thumb-title none"], flags="d")

This opens feh in a seperate window showing the files in the current directory, is there a way to have it open like it does from rifle conf where it integrates with Ranger and shows the images in the terminal?

thanks

--jerry

PS The work around the preview files in root worked great.

thanks


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1702 2013-04-24 11:01:28

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

drawing images in the terminal has nothing to do with rifle.conf or with feh, actually. that's a separate feature which uses a part of the w3m web browser. And currently it can only draw 1 image at a time.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1703 2013-04-24 11:13:36

jk121960
Member
From: Palos Hills, Illinois
Registered: 2011-12-09
Posts: 254

Re: Ranger, a textbased filemanager

OK appreciate it, thanks smile

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1704 2013-04-28 10:17:51

d0lphchrist
Member
Registered: 2011-11-16
Posts: 8

Re: Ranger, a textbased filemanager

Hi hut,

thanks for this great filemanager!
I'm using it exclusively since over a year and I'm happier than I was with any other filemanager before smile

I've noticed that bulkrename doesn't work for me with gvim set as editor.
It opens a temporary file in gvim, but the file is always empty and even if I write filenames in there manually it says after saving and closing gvim: "No renaming to be done!".
This happens to me no matter if I start ranger using "EDITOR=gvim ranger" or setting gvim as the default editor manually in the rifle.conf .

edit: I'm using ranger-git 1.6.0.110.gd763950-1 from AUR

Last edited by d0lphchrist (2013-04-28 10:21:07)

Offline

#1705 2013-04-29 23:57:50

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

d0lphchrist wrote:

Hi hut,

thanks for this great filemanager!
I'm using it exclusively since over a year and I'm happier than I was with any other filemanager before smile

I've noticed that bulkrename doesn't work for me with gvim set as editor.
It opens a temporary file in gvim, but the file is always empty and even if I write filenames in there manually it says after saving and closing gvim: "No renaming to be done!".
This happens to me no matter if I start ranger using "EDITOR=gvim ranger" or setting gvim as the default editor manually in the rifle.conf .

edit: I'm using ranger-git 1.6.0.110.gd763950-1 from AUR

Gotta mark the files first, by typing space, or search for "mark" in the man page.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1706 2013-04-30 21:54:05

d0lphchrist
Member
Registered: 2011-11-16
Posts: 8

Re: Ranger, a textbased filemanager

hut wrote:
d0lphchrist wrote:

Hi hut,

thanks for this great filemanager!
I'm using it exclusively since over a year and I'm happier than I was with any other filemanager before smile

I've noticed that bulkrename doesn't work for me with gvim set as editor.
It opens a temporary file in gvim, but the file is always empty and even if I write filenames in there manually it says after saving and closing gvim: "No renaming to be done!".
This happens to me no matter if I start ranger using "EDITOR=gvim ranger" or setting gvim as the default editor manually in the rifle.conf .

edit: I'm using ranger-git 1.6.0.110.gd763950-1 from AUR

Gotta mark the files first, by typing space, or search for "mark" in the man page.

I know, I've used bulkrename before wink
I should have mentioned more explicitly that it works for me with EDITOR=vim but not with EDITOR=gvim.
This bug / missing feature also occurs to me with the default configuration (I've renamed ~/.config/ranger before starting ranger to test this).

As a quickfix I've simply changed app='editor' to app='vim' in the bulkrename class of commands.py (line 742) and use gvim as the default editor for any other textprocessing. But this is a rather hackish solution wink

Last edited by d0lphchrist (2013-04-30 22:07:21)

Offline

#1707 2013-04-30 23:27:45

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

@d0lphchrist
I see... the problem is that gvim forks to background like a daemon and ranger can't know when it quit. You'd have to use "gvim -f", but currently, passing options to the editor is not supported by ranger (i.e. "EDITOR='gvim -f' ranger" would not work).

So what you have to do is:

echo -e '#!/bin/sh\nexec gvim -f "$@"' | sudo tee /usr/bin/gvim_f
sudo chmod +x /usr/bin/gvim_f
EDITOR=gvim_f ranger

"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1708 2013-05-01 02:55:28

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: Ranger, a textbased filemanager

bulkrename is a life saver especialy within vim %s/foo/bar/g

gvim comes with its own vim


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#1709 2013-05-01 08:17:43

d0lphchrist
Member
Registered: 2011-11-16
Posts: 8

Re: Ranger, a textbased filemanager

hut wrote:

@d0lphchrist
I see... the problem is that gvim forks to background like a daemon and ranger can't know when it quit. You'd have to use "gvim -f", but currently, passing options to the editor is not supported by ranger (i.e. "EDITOR='gvim -f' ranger" would not work).

So what you have to do is:

echo -e '#!/bin/sh\nexec gvim -f "$@"' | sudo tee /usr/bin/gvim_f
sudo chmod +x /usr/bin/gvim_f
EDITOR=gvim_f ranger

I see. Thanks for the answer.
I think I'll use normal gvim for textprocessing, so I can continue to use ranger while having a textfile opened, and gvim_f for bulkrename.

Offline

#1710 2013-05-08 12:33:17

chignole
Member
Registered: 2012-02-06
Posts: 10

Re: Ranger, a textbased filemanager

Hello all,

First of all thanks for this great file manager. I use it since about a year and i like the speed and efficiency. It goes perfectly with Awesome WM.

Anyway since i reinstalled it, all the text files open with Nano instead of VIM, the bulkrename command to, which is pretty anoying, do you know what i could do to change that ?

I looked at the riffle.conf file and found this :

#-------------------------------------------
# Misc
#-------------------------------------------
# Define the "editor" for text files as first action
mime ^text,  label editor = "$EDITOR" -- "$@"
mime ^text,  label pager  = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@"
!mime ^text, label editor, ext xml|csv|tex|py|pl|rb|sh|php = "$PAGER" -- "$@"

Looks like i should change the $EDITOR variable but i'm not sure, and i can't even tell where it is ...

Thanks by advance

Offline

#1711 2013-05-08 12:51:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Ranger, a textbased filemanager

chignole, $EDITOR is an environment variable.  There are various places it could be set such as ~/.bash_profile or ~/.bashrc - there's also the system-wide settings in /etc/bash_profile.

You can see what the variable is set to at the command line with `echo $EDITOR`.  If you want to test whether this is the issue, you can try `EDITOR=vim ranger`.  If it then works as you'd want, then you just need to set EDITOR globally.

Of course, you could also take $EDITOR out of the ranger conf files and "hardcode" vim in.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#1712 2013-05-08 15:33:54

chignole
Member
Registered: 2012-02-06
Posts: 10

Re: Ranger, a textbased filemanager

I just set vim as the default editor in my bashrc file and it works now, thanks a lot

Offline

#1713 2013-05-18 17:04:48

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: Ranger, a textbased filemanager

Yoo.

Can I extract rar zip file via simple command ?

Offline

#1714 2013-05-18 18:04:22

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: Ranger, a textbased filemanager

You can install the mighty package atool

http://www.nongnu.org/atool/
https://www.archlinux.org/packages/community/any/atool/

In ranger I select the file, push `!' to enter the ranger shell interface and type:

aunpack -e %s

Otherwise you can bind the command in your .config/ranger/rc.conf

cmap ,z aunpack -e %s

press ',z' on the selected file to uncompress any archives types.

Offline

#1715 2013-05-18 18:09:15

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

mentat wrote:

You can install the mighty package atool

http://www.nongnu.org/atool/
https://www.archlinux.org/packages/community/any/atool/

In ranger I select the file, push `!' to enter the ranger shell interface and type:

aunpack -e %s

Otherwise you can bind the command in your .config/ranger/rc.conf

cmap ,z aunpack -e %s

press ',z' on the selected file to uncompress any archives types.

Or just press 1l or r1<enter>


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1716 2013-05-18 18:17:39

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: Ranger, a textbased filemanager

@hut
Respect.

Offline

#1717 2013-05-18 18:19:50

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: Ranger, a textbased filemanager

thanks, working wink

Offline

#1718 2013-05-20 20:47:02

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Ranger, a textbased filemanager

So I've just tried to use :bulkrename on a bunch of video files, and got the following error message:

"No module named 'ranger.fsobject.file'; ranger.fsobject is not a package"

I've never encountered this before, and I've used :bulkrename quite a bit in the past.  Any tips?

EDIT: I'm using the current git pull; probably last updated a week or so ago.  I just installed the version from [community] to give that a shot, and it works fine.

Last edited by ANOKNUSA (2013-05-20 20:48:14)

Offline

#1719 2013-05-20 21:14:02

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

ANOKNUSA, you have an outdated ~/.config/ranger/commands.py. If you didn't add any custom commands, you can simply delete that file.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1720 2013-05-20 22:24:08

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Ranger, a textbased filemanager

That did it hut,  thanks.  I must have missed an update message somewhere.

Offline

#1721 2013-05-27 15:57:08

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

I'd like to announce that there is now a central place for all your ranger questions: the ranger Q&A system!

Please ask your ranger questions there from now on; you can even post anonymously (though registration is advised). The size of this thread is making me dizzy, and many good ideas have been lost already.  I hope it will be easier to keep track of questions and answers in the new system.

edit: s/post/thread/

Last edited by hut (2013-05-27 17:18:42)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#1722 2013-05-27 17:03:07

gridcol
Member
From: Karlsruhe, Germany
Registered: 2012-03-27
Posts: 32

Re: Ranger, a textbased filemanager

hut wrote:

I'd like to announce that there is now a central place for all your ranger questions: the ranger Q&A system!

Please ask your ranger questions there from now on; you can even post anonymously (though registration is advised). The size of this post is making me dizzy, and many good ideas have been lost already.  I hope it will be easier to keep track of questions and answers in the new system.

Nice, thank you for all your time to make this beautiful peace of software better and better.

Offline

#1723 2013-06-01 19:40:06

McDoenerKing
Member
From: Germany
Registered: 2010-06-21
Posts: 59

Re: Ranger, a textbased filemanager

@hut

I have a little question: Might it be possible to find some performance bottlenecks and work at them?

Reason: I am mostly using a netbook and I used ranger a lot on it for two years but for about half a year it works much slower. I use a clean install, but often moving between directories takes some seconds where it used to be almost instant. hmm

Note: I am using vanilla installation and haven't done any configuration. If you were to find the culprits and open issues about them on github, I may be able to take a look at them and decide if I can do something about them myself! Sadly I am not familiar enough with the codebase hence the question.
Does anybody else have experienced a less fluent experience with ranger recently?

Ranger version: ranger-git from aur
System: 32-bit Archlinux
Machine: Samsung NC10Plus Netbook

Offline

#1724 2013-06-06 01:10:36

Veedrac
Member
Registered: 2011-07-19
Posts: 81

Re: Ranger, a textbased filemanager

McDoenerKing wrote:

@hut

I have a little question: Might it be possible to find some performance bottlenecks and work at them?

Reason: I am mostly using a netbook and I used ranger a lot on it for two years but for about half a year it works much slower. I use a clean install, but often moving between directories takes some seconds where it used to be almost instant. hmm

Note: I am using vanilla installation and haven't done any configuration. If you were to find the culprits and open issues about them on github, I may be able to take a look at them and decide if I can do something about them myself! Sadly I am not familiar enough with the codebase hence the question.
Does anybody else have experienced a less fluent experience with ranger recently?

It's fine on my side.

You should try running "ranger --clean --profile" and holding down the "}" key. Post the top of the output.

However, you should try the new Q&A system, as this thread is too long. You don't need to sign up, even.

Offline

#1725 2013-06-09 11:33:09

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: Ranger, a textbased filemanager

Hi again can i search in dictionarys via command some regular expression ?

Offline

Board footer

Powered by FluxBB