You are not logged in.

#1301 2012-04-13 13:16:07

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

Re: Ranger, a textbased filemanager

TheImmortalPhoenix wrote:

Hi, i have a problem: when i type a command in ranger (for example :delete) nothing appens and ranger is locked and i can't do anything, just exit ... This appens with all commands i type after " : "

Since when? Try ranger --clean and if it works, your config is probably outdated.

Veedrac wrote:

Here's my revised code, which can run with "-S":

Thanks for pointing out a bunch of dents in the code.

The main reason I call file instead of the builtin mimetype module is that file is simply better at guessing the mimetype. The mimetype module relies solely on the extension of the file while `file --mime-type` cuts the file open to see what's inside so it will even work on files with a wrong or no extension.

Well I guess I'm going to have the spawn() and get_executable() functions inlined from now on so you can run it with -S smile.

Veedrac wrote:

EDIT: Woa, you like tuples:

tests = tuple(tuple(f.strip().split(None, 1)) for f in tests)
tests = tuple(tests)

>_< The second line is redundant, obviously big_smile


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

Offline

#1302 2012-04-13 13:17:19

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

Re: Ranger, a textbased filemanager

hut wrote:

rifle.conf entry:

ext jpe?g|png|gif, flag f, X = <scriptname> "$@"

It would be good to have in ranger by default but such a large script doesn't fit in rifle.conf. I guess i'll put it in the doc/ directory or something.

Hut, thanks for rifle and the sxiv script but :

When I use it on an image with the shell command:

msxiv picture.jpg

it's work like a charm, I see my picture inside list of all images.

When I use it with rifle.conf :

I try :

ext jpe?g|png|gif, flag f, X = msxiv "$@"

it work like sxiv, there is only one picture in the list.

I try:

mime ^image, has msxiv,  X, flag f = msxiv -- "$@"

same results only 1/1 picture in the list

?!

Offline

#1303 2012-04-13 13:55:32

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

Re: Ranger, a textbased filemanager

I suspect that you put the line somewhere at the bottom of rifle.conf. Ranger runs the first command in the list by default. You can either put the msxiv command at the top of rifle.conf or press r and select a number


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

Offline

#1304 2012-04-13 14:05:39

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

Re: Ranger, a textbased filemanager

I've put it on top of the list :

#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image, has msxiv,  X, flag f = msxiv -- "$@"
mime ^image, has sxiv,   X, flag f = sxiv -- "$@"
mime ^image, has feh,    X, flag f = feh -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has gimp,   X, flag f = gimp -- "$@"
ext xcf,                 X, flag f = gimp -- "$@"

I see it in the 'r' list and it doesn't work like the shell command does.

Offline

#1305 2012-04-13 16:24:37

TheImmortalPhoenix
Member
From: 127.0.0.1
Registered: 2011-08-13
Posts: 436

Re: Ranger, a textbased filemanager

@ hut, yeah it was outdated...i run that command and everything works now...thanks!

Offline

#1306 2012-04-13 17:28:41

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

Re: Ranger, a textbased filemanager

TheImmortalPhoenix wrote:

@ hut, yeah it was outdated...i run that command and everything works now...thanks!

But its no permanent solution. --clean just ignores configs/bookmarks/etc. If you want to use bookmarks and stuff, you should diff the configs or just remove the ones you don't need.

@mentat:
I really have no idea...


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

Offline

#1307 2012-04-13 17:37:29

TheImmortalPhoenix
Member
From: 127.0.0.1
Registered: 2011-08-13
Posts: 436

Re: Ranger, a textbased filemanager

mmm i need all but i don't know how to edit them, could you share your updated configs? So i can compare them with mine

Offline

#1308 2012-04-13 18:06:39

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

Re: Ranger, a textbased filemanager

hut wrote:

@mentat:
I really have no idea...

Hut, just find the solution:

remove the argument protect "--"

mime ^image, has msxiv,  X, flag f = msxiv "$@"

And it's working !

Offline

#1309 2012-04-13 18:44:53

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

Re: Ranger, a textbased filemanager

TheImmortalPhoenix wrote:

mmm i need all but i don't know how to edit them, could you share your updated configs? So i can compare them with mine

man ranger, section "FILES"

Also, note that if you used --copy-config before, and copied the files "commands.py", "options.py", "rc.conf", "scope.sh", "rifle.conf" but never edited them (or your changes were not important), you can safely delete them and the new default versions will be used instead.


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

Offline

#1310 2012-04-13 18:45:36

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

Re: Ranger, a textbased filemanager

Hut, one final question.

I'm not saying I will - holidays end on Monday - but if I have the time and the will I may implement my suggestions in my posts. Now I've decided how to do it (mostly) without editing Ranger I think I feel a lot more confident. If I do implement it, would you be interested? As I have said, rifle could stay separate. In fact, it should be trivial to add proper backwards compatibility (non-modal, even) as long as the other stuff is dealt with. I don't see a meaningful disadvantage, so would you be interested in that case?

Offline

#1311 2012-04-13 19:33:09

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

Re: Ranger, a textbased filemanager

Let's talk in IRC about your ideas?


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

Offline

#1312 2012-04-13 20:00:35

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

Re: Ranger, a textbased filemanager

I've never used IRC, but I think I get how.  I'm on #archlinux now, which I see is too late (and have no clue how to disconnect tongue) not too late. Are there PMs or is it all in the open, to be crowded out by all these other voices?

Last edited by Veedrac (2012-04-13 20:06:44)

Offline

#1313 2012-04-14 17:57:14

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

Re: Ranger, a textbased filemanager

Hi Hut and thanks for this unbelievable tool, I am just getting used to some of the bindings but it's here to stay. I am using ranger-git and it has been great, but all of a sudden I started getting this error

Syntax error in /root/.config/ranger/rifle.conf line 1 (Line without delimiter)

Now the strange thing is I swapped out that file for the default and it didn't fix it and it is only happening when I try to edit a certain file. BTW I am opening my files with vim. I checked that file also and swapped it out and the error is still there, ok next test I opened one of the backups (~4~) that I had renamed to the original that had the error, it has the error as the original file name but named as a backup "~4~" it opens it with no error? Also as a side note these are files generated by phpmyadmin for server setup. "config.inc.php" so it's not like I edited it myself. I had also opened this file yesterday with no problem.

thanks once again, for your talent and your effort.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1314 2012-04-15 11:08:26

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

Re: Ranger, a textbased filemanager

One more question as long as I'm here, Is there a way to make the terminal when opened from ranger take over the window like it does with vim? When I open a document with vim ranger disappears till I close it. I would like the same to happen with the terminal.


thanks

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1315 2012-04-15 12:08:58

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: Ranger, a textbased filemanager

jk121960 wrote:

One more question as long as I'm here, Is there a way to make the terminal when opened from ranger take over the window like it does with vim? When I open a document with vim ranger disappears till I close it. I would like the same to happen with the terminal.


thanks

--jerry

You can press Shift+s to open the shell in the $PWD, if that's what you're after. Ctrl+d gets you back into ranger.


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#1316 2012-04-15 13:06:29

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

Re: Ranger, a textbased filemanager

Miblo wrote:
jk121960 wrote:

One more question as long as I'm here, Is there a way to make the terminal when opened from ranger take over the window like it does with vim? When I open a document with vim ranger disappears till I close it. I would like the same to happen with the terminal.


thanks

--jerry

You can press Shift+s to open the shell in the $PWD, if that's what you're after. Ctrl+d gets you back into ranger.

Yes that was it, I am still learning the tool and I appreciate your help with this thanks

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1317 2012-04-15 13:19:29

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: Ranger, a textbased filemanager

jk121960 wrote:
Miblo wrote:
jk121960 wrote:

One more question as long as I'm here, Is there a way to make the terminal when opened from ranger take over the window like it does with vim? When I open a document with vim ranger disappears till I close it. I would like the same to happen with the terminal.


thanks

--jerry

You can press Shift+s to open the shell in the $PWD, if that's what you're after. Ctrl+d gets you back into ranger.

Yes that was it, I am still learning the tool and I appreciate your help with this thanks

--jerry

My pleasure, jerry. It's well worth checking out `man ranger` (also accessible by pressing ? in ranger).


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#1318 2012-04-15 13:21:07

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

Re: Ranger, a textbased filemanager

Miblo wrote:
jk121960 wrote:
Miblo wrote:

You can press Shift+s to open the shell in the $PWD, if that's what you're after. Ctrl+d gets you back into ranger.

Yes that was it, I am still learning the tool and I appreciate your help with this thanks

--jerry

My pleasure, jerry. It's well worth checking out `man ranger` (also accessible by pressing ? in ranger).

Appreciate thanks I will.

--jerry


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1319 2012-04-15 18:39:13

catch22
Member
Registered: 2012-04-15
Posts: 10

Re: Ranger, a textbased filemanager

I wonder why there's no activity on
http://lists.nongnu.org/archive/html/ranger-users/

Can't be that all Ranger-users are Archers?
I'm not, anyway; subscribed here especially for this thread :-)

Offline

#1320 2012-04-15 18:45:06

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

Re: Ranger, a textbased filemanager

catch22 wrote:

I wonder why there's no activity on
http://lists.nongnu.org/archive/html/ranger-users/

Can't be that all Ranger-users are Archers?
I'm not, anyway; subscribed here especially for this thread :-)

Maybe it's a sign that you should try arch, like minds!!


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1321 2012-04-15 19:06:29

catch22
Member
Registered: 2012-04-15
Posts: 10

Re: Ranger, a textbased filemanager

jk121960 wrote:
catch22 wrote:

I wonder why there's no activity on
http://lists.nongnu.org/archive/html/ranger-users/

Can't be that all Ranger-users are Archers?
I'm not, anyway; subscribed here especially for this thread :-)

Maybe it's a sign that you should try arch, like minds!!

I'm on Crunchbang and find that geeky enough already for my limited skills :-)
edited: added "limited" :-)

Last edited by catch22 (2012-04-15 19:07:32)

Offline

#1322 2012-04-16 14:55:27

catch22
Member
Registered: 2012-04-15
Posts: 10

Re: Ranger, a textbased filemanager

I went to rifle.py and was surprised to see nano was there as editor.
I changed it to gvim, but it altered ranger's behaviour - opening gvim not in the right panel but separately. 

I tried a search for nano in the forum and saw a mention in this thread, but in which of the 53 pages I can't see.
I guess there's a good reason for using nano instead of (g)vim in ranger, given that ranger is based on vim's commands?

Offline

#1323 2012-04-16 15:02:11

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

Re: Ranger, a textbased filemanager

catch22 wrote:

I went to rifle.py and was surprised to see nano was there as editor.
I changed it to gvim, but it altered ranger's behaviour - opening gvim not in the right panel but separately. 

I tried a search for nano in the forum and saw a mention in this thread, but in which of the 53 pages I can't see.
I guess there's a good reason for using nano instead of (g)vim in ranger, given that ranger is based on vim's commands?

If you like gvin, it also installs vim. Vim will open up and take place of ranger till you close it.


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

#1324 2012-04-17 20:08:23

catch22
Member
Registered: 2012-04-15
Posts: 10

Re: Ranger, a textbased filemanager

^I'm still curious why I find nano there instead of vim, since Ranger works with vim commands; it doesn't make sense does it?

Offline

#1325 2012-04-17 20:18:50

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

Re: Ranger, a textbased filemanager

catch22 wrote:

^I'm still curious why I find nano there instead of vim, since Ranger works with vim commands; it doesn't make sense does it?


Nano is there for the people that don't use vim, hut puts in a range of editors that are common, nano being one of them.

--jerry

Every install of ranger I have used has had vim in the list. So I am not sure what to think if you dont see it at all

Last edited by jk121960 (2012-04-17 20:20:20)


Arch Awesome, Ranger & Vim the coding triple threat.

Offline

Board footer

Powered by FluxBB