You are not logged in.

#926 2011-04-20 22:46:55

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

Re: Ranger, a textbased filemanager

@Google
I'll look into this in the weekend.

@litemotiv
1. Just to confirm, you said your problem also appears when you enter :cd with part of the directory and press TAB? That's strange, because this action should have the same effect as the script I gave you ;(
2. Try :set colum_ratios 3,1 and disable the preview with zpzP. Then g/ and :cd /media/ssh/servername<enter>
3. Does it also happen if you only mount 1 ssh server?
4. If you got IRC or something we could debug this faster

@killua
you can interrupt preview generation with ctrl+c.
If you are using a preview script (scope.sh) you could modify that script and exit without touching these files.

@niksfirefly and Dieter@be
You can traverse directories with the ] key. Also, I like this one:
map("F", fm.open_console("shell -p find . | grep -iI "))
Your idea sounds useful too, lets see if I can implement that

@ramboman
Take a look at the config file called "apps.py" and read the second chapter of the help (by typing "2?"), chapter 2.4 in particular.
(You can get a copy of apps.py by running ranger --copy-config=apps)


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

Offline

#927 2011-04-22 21:54:51

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

@hut,

Thanks for the ranger! Very attractive!

Two little questions:

1. On copying rather big files (say, few GiB) I feel some lack of information about current operation state (is the operation finished? has it expected speed - at case of remote filesystem?). Have you thoughts/plans related to some kind of minimal ranger feedback for such cases? -something humble like "56%-78MiB/s" as part of status (bottom) line.

2. I have tested a speed of few file managers for cifs-mounted file transfer (post #4): https://bbs.archlinux.org/viewtopic.php?id=115788 Now I have tested ranger also. Last one is in par with cp and qtFM. Why not with worker and mucommander? smile Is some kind of buffer size very small by default?

Edit 1). ..or add MiB/s field to Task View

Last edited by student975 (2011-04-22 23:37:22)


"I exist" is the best myth I know..

Offline

#928 2011-04-23 20:01:08

anon27
Member
Registered: 2010-11-10
Posts: 18

Re: Ranger, a textbased filemanager

How could I change find's behavior so that after a directory is found and opened the find command is left opened so I can immediately start finding a subdirectory/file? I'll give an example because I'm probably not being very clear:

Say I want to open .config/ranger/commands.py. If I want to move with find I have to do the following:

:find .confi
:find ra
:find co

But what I'd like to be able to do is this:

:find .confiraco

Another thing I'd like to add but probably not trivial at all to implement is for :find to be able to guess what directory I mean when there's conflict by also searching the files within the directory. For example, if I had .config/ and .config2/, with .config2/ only having a foobar.txt file inside, then I could still do :find .confira and Ranger would know that I want to go to .config/ranger/, or :find .confifoo to open foobar.txt, or even just :find foobar if there are no other files that conflict in the entire tree.

If I'm not being clear then basically what I want is for :find to behave like the Command-T plugin for Vim.

Offline

#929 2011-04-23 23:37:50

PotatoesMaster
Member
From: France
Registered: 2010-08-26
Posts: 54

Re: Ranger, a textbased filemanager

Hi !

I think the behaviour of word-deletion in command mode is a little annoying. It is only possible to delete the last word of the line.

Here is a modification to allow in-text deletion and forward word-deletion :

    # ranger/gui/widgets/console.py
    def delete_word(self, backward=True):
        if self.line:
            self.tab_deque = None
            if backward:
                right_part = self.line[self.pos:]
                i = self.pos - 2
                while i >= 0 and re.match(r'[\w\d]', self.line[i], re.U):
                    i -= 1
                self.copy = self.line[i + 1:self.pos]
                self.line = self.line[:i + 1] + right_part
                self.pos = i + 1
            else:
                left_part = self.line[:self.pos]
                i = self.pos + 1
                while i < len(self.line) and re.match(r'[\w\d]', self.line[i], re.U):
                    i += 1
                self.copy = self.line[self.pos:i]
                if i >= len(self.line):
                    self.line = left_part
                    self.pos = len(self.line)
                else:
                    self.line = left_part + self.line[i:]
                    self.pos = len(left_part)
            self.on_line_change()

Keep up the good job and thanks for all ! wink

Offline

#930 2011-04-24 01:10:25

groundnuty
Member
Registered: 2010-11-16
Posts: 17

Re: Ranger, a textbased filemanager

would like to propose a patch:

ranger 1.4.3 (stable)
diff /usr/lib/python3.2/site-packages/ranger/core/loader.py myloader.py

26c26
< 
---
> import chardet
92c92
<                                 read = read.decode('utf-8')
---
>                                 read = self.safeDecode(read)
98c98
<                                 read = read.decode('utf-8')
---
>                                 read = self.safeDecode(read)
106c106
<                         l = l.decode('utf-8')
---
>                         l = self.safeDecode(l)
111c111
<                     read = read.decode('utf-8')
---
>                     read = self.safeDecode(read)
114a115,123
> 
>     def safeDecode(self,str):
>         decodedStr=None
>         try:
>             decodedStr = str.decode("utf-8")
>         except (UnicodeDecodeError):
>             decodedStr = str.decode(chardet.detect(str)["encoding"])
>         return decodedStr
> 

Probably this function fits better as addition to different class.

I had trouble with some crappy rar archives that had characters encoded not in utf8.
With it all working fine smile

Offline

#931 2011-04-24 02:44:12

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Ranger, a textbased filemanager

been looking through the RANGER thread here for anything that shows me the curent way to set show hidden files always.
And, perhaps there's been a change as I now use the 'zh' command, though some months back I use something else which
was an optional key command I guess. No matter on that of course as if I can set show all dot file to be the default I can use
'zh' when I like for show/hide.

thanks!

(Sorry I couldn't recall how this was done from when I set it a year or so back. Could be an even more elegant way now perhaps.)

Last edited by yvonney (2011-04-24 02:45:16)

Offline

#932 2011-04-24 05:46:02

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Ranger, a textbased filemanager

yvonney wrote:

been looking through the RANGER thread here for anything that shows me the curent way to set show hidden files always.

You can change that in ~/.config/ranger/config

yvonney wrote:

No matter on that of course as if I can set show all dot file to be the default I can use
'zh' when I like for show/hide.

You can set that in ~/.config/ranger/keys.py (By default ranger user Backspace and ^H to show/hide dot files)

Last edited by igndenok (2011-04-24 05:46:28)


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#933 2011-04-24 17:36:20

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

@litemotiv
1. Just to confirm, you said your problem also appears when you enter :cd with part of the directory and press TAB? That's strange, because this action should have the same effect as the script I gave you ;(
2. Try :set colum_ratios 3,1 and disable the preview with zpzP. Then g/ and :cd /media/ssh/servername<enter>
3. Does it also happen if you only mount 1 ssh server?
4. If you got IRC or something we could debug this faster

Oddly enough, since some of the latest package updates, i haven't been able to reproduce this. This is interesting, since it had been a persistent problem for me for quite a while.. I'll keep an eye on things to see if it returns, and i'll pm you on irc if it happens again.

Thanks for your help. smile


ᶘ ᵒᴥᵒᶅ

Offline

#934 2011-04-24 22:14:18

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Ranger, a textbased filemanager

thanks igndenok !

well, there isn't any config in ~/.config/ranger/
and ctrl H no longer works.
zh does.

I'm hoping I'm wrong on both points.

SO, create a config and put what in it?

appreciated.

Offline

#935 2011-04-24 22:44:57

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

Re: Ranger, a textbased filemanager

yvonney wrote:

thanks igndenok !

well, there isn't any config in ~/.config/ranger/
and ctrl H no longer works.
zh does.

I'm hoping I'm wrong on both points.

SO, create a config and put what in it?

appreciated.

Invoking `ranger --copy-config=options` and then editing line 40 of "~/.config/ranger/options.py" accordingly should do the trick. Sorry I can't help with your ^h problem. Does Backspace not work either?

Last edited by Miblo (2011-04-24 23:08:28)


@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

#936 2011-04-25 07:10:04

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Ranger, a textbased filemanager

That was extremely cool to do thank you Miblo and thank you again igndenok.
I've been hoping to save doing the keystrokes needed to unhide for some while now.
Also, I like 'zh' for unhid/hide. kinda standard I thought.

backspace doesn't do anything same as ctrl H and that's more than fine too.
my system's very very cool thanks to ARCH and the forums and I'm very used
to nothing being perfectly managed due to my skill level.

It's my relentless interest however  (quite the usual around here:-)
and xmonad/tmux/ranger and the rest that have me in awesomeness-land.

thanks everyone.

Last edited by yvonney (2011-04-25 17:35:45)

Offline

#937 2011-04-25 08:00:25

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Ranger, a textbased filemanager

@yvonney: If keys.py doesn't present in ~/.config/ranger, you can invoke ranger with '--copy-config=keys' (according ranger man) and then you can change default keybinding unhide/hide.


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#938 2011-04-25 20:35:05

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

Sometimes htm(l) files preview (elinks is in use) doesn't work, the error example is: 'utf8' codec can't decode byte 0xd0 in position 511: unexpected end of data. OTOH, 'elinks -dump thisFile.htm' does work without problems. How to cure?


"I exist" is the best myth I know..

Offline

#939 2011-04-26 06:25:29

tladuke
Member
Registered: 2009-07-23
Posts: 176

Re: Ranger, a textbased filemanager

can the preview pane be on the bottom? I want it to be the full width of the term.

Offline

#940 2011-04-26 15:34:14

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

Another problem. If an archive is password-protected, ranger just hangs on this archive selection. 'atool', being called directly, just asks a password. Any ideas to resolve?


"I exist" is the best myth I know..

Offline

#941 2011-04-26 18:33:54

PotatoesMaster
Member
From: France
Registered: 2010-08-26
Posts: 54

Re: Ranger, a textbased filemanager

Custom tags.
Default shortcut: <A-t><tag> with tag in alphanumeric chars + some more (:=+-/*:.!?%#@$ ...).
Can be improved. smile

Here is a screenshot: http://ompldr.org/vOGZsbQ/ranger_custom_tags.png
And here is the patch: http://pastebin.archlinux.fr/pastebin.php?dl=432213

P.S.: save your ".config/ranger/tagged" if you want to test

Last edited by PotatoesMaster (2011-04-27 17:28:08)

Offline

#942 2011-04-26 19:41:19

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

Re: Ranger, a textbased filemanager

Thanks for the patches and reports. I've applied your patches, except for the custom tags patch until I modify it for backwards compatibility.

student975 wrote:

1. On copying rather big files (say, few GiB) I feel some lack of information about current operation state (is the operation finished? has it expected speed - at case of remote filesystem?). Have you thoughts/plans related to some kind of minimal ranger feedback for such cases? -something humble like "56%-78MiB/s" as part of status (bottom) line.

Yes, thats planned

student975 wrote:

2. I have tested a speed of few file managers for cifs-mounted file transfer (post #4): https://bbs.archlinux.org/viewtopic.php?id=115788 Now I have tested ranger also. Last one is in par with cp and qtFM. Why not with worker and mucommander? smile Is some kind of buffer size very small by default?

Because ranger doesnt copy, ranger calls cp smile

anon27 wrote:

basically what I want is for :find to behave like the Command-T plugin for Vim.

The inherent problem with it: ranger would need to scan the whole tree which isn't always desirable. It does look useful though... If you're interested in implementing it yourself, take a look at the commands.py, class find, method quick().

student975 wrote:

Sometimes htm(l) files preview (elinks is in use) doesn't work, the error example is: 'utf8' codec can't decode byte 0xd0 in position 511: unexpected end of data. OTOH, 'elinks -dump thisFile.htm' does work without problems. How to cure?

I applied groundnuty's patch, upgrade and try again smile

student975 wrote:

Another problem. If an archive is password-protected, ranger just hangs on this archive selection. 'atool', being called directly, just asks a password. Any ideas to resolve?

Are you talking about file previews? Indeed, if any program asks for input, things will get screwed up.

tladuke wrote:

can the preview pane be on the bottom? I want it to be the full width of the term.

Edit BrowserView.resize() at ranger/gui/widgets/browserview.py to change the positions of the panes

yvonney wrote:

been looking through the RANGER thread here for anything that shows me the curent way to set show hidden files always.

Add the line "show_hidden = True" to ~/.config/ranger/options.py


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

Offline

#943 2011-04-26 20:08:19

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

hut wrote:
student975 wrote:

...-something humble like "56%-78MiB/s" as part of status (bottom) line.

Yes, thats planned

Thanks!

hut wrote:
student975 wrote:

I have tested ranger also. Last one is in par with cp...

Because ranger doesnt copy, ranger calls cp smile

Are you going to stay with this slow way? smile

hut wrote:
student975 wrote:

'utf8' codec can't decode byte 0xd0 in position...

I applied groundnuty's patch, upgrade and try again smile

I guess you are talking about ranger-git - thanks, I'll switch to one.

hut wrote:
student975 wrote:

If an archive is password-protected,....

Are you talking about file previews? Indeed, if any program asks for input, things will get screwed up.

Yes, saying about selection I mean it results in preview, and last one results in atool call. Great, I'll wait with all possible patience as far as the issue is a showstopper at my common use cases smile


"I exist" is the best myth I know..

Offline

#944 2011-04-26 20:17:13

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

Re: Ranger, a textbased filemanager

student975 wrote:
hut wrote:
student975 wrote:

I have tested ranger also. Last one is in par with cp...

Because ranger doesnt copy, ranger calls cp smile

Are you going to stay with this slow way? smile

Switching the copying backend is trivial, you know a fast replacement for cp?


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

Offline

#945 2011-04-26 20:19:31

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

hut wrote:
student975 wrote:

'utf8' codec can't decode byte 0xd0 in position 511: unexpected end of data...

I applied groundnuty's patch, upgrade and try again smile

I have switched to ranger-git. Now I don't see this error (and 'W' is clean), but at (much more) seldom cases I still don't see preview.


"I exist" is the best myth I know..

Offline

#946 2011-04-26 20:24:15

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

Re: Ranger, a textbased filemanager

student975 wrote:
hut wrote:
student975 wrote:

'utf8' codec can't decode byte 0xd0 in position 511: unexpected end of data...

I applied groundnuty's patch, upgrade and try again smile

I have switched to ranger-git. Now I don't see this error (and 'W' is clean), but at (much more) seldom cases I still don't see preview.

Can you send me (romanz lavabit com) some files to reproduce the bugs? One where you don't see the preview and one where atool asks for password.


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

Offline

#947 2011-04-26 20:30:01

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

hut wrote:

Switching the copying backend is trivial, you know a fast replacement for cp?

I don't know how you process directory tree, but for single file dd (with few MiB bs) is much faster at my case.


"I exist" is the best myth I know..

Offline

#948 2011-04-26 20:44:36

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

hut wrote:

Can you send me (romanz lavabit com) some files to reproduce the bugs? One where you don't see the preview and one where atool asks for password.

Yes, of course. Have sent. Don't filter out my message as spam smile


"I exist" is the best myth I know..

Offline

#949 2011-04-27 10:45:52

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Ranger, a textbased filemanager

What is a common way to deal with archives? I mean we want to stay in text mode. And let's imagine simple case when an archive isn't password-protected. So, we have /very/long/and/deep/source/path/someArchiveNameWithSpaces.tar.bz2 and /even/more/deep/and/long/destination/path. How does ranger help here?


"I exist" is the best myth I know..

Offline

#950 2011-04-27 10:58:16

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Ranger, a textbased filemanager

A VFS for archives would be fantastic. I have no idea how hard that is to implement.

Offline

Board footer

Powered by FluxBB