ranger-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ranger-users] ranger 1.6.0 on the horizon


From: Joshua Landau
Subject: Re: [Ranger-users] ranger 1.6.0 on the horizon
Date: Wed, 13 Feb 2013 19:49:57 +0000

On 13 February 2013 19:34, Joshua Landau <address@hidden> wrote:
On 13 February 2013 03:23, Roman Z. <address@hidden> wrote:
> >>*It lacks libcolumbus support though.*
> Its not really important to support full library. Skipping letters is. I
> suggest implementation via regex. Its trivial and you can choose between
> several options:
>
> If I type "npd"
>
> 1. Insert .* between each letter.  ".*n.*p.*d.*"
> 2. Insert .* between each letter and use ^ before first. "^n.*p.*d.*" .
> Little more natural
> 3. Insert .* between each letter except first and the last: "n.*p.*d". This
> way I could type ^npd$ for instance if I want to. Sounds like the best
> option.
>
> All 3 were implemented in QuickSearch eXtended for Total Commander on my
> suggestion several years ago and I can't live without it.
>
> This would be really great to have in another mode so that one doesn't have
> to type f all the time (with option for automatic open on single match, I
> find it confusing now when it opens on its own, although I am trying to
> adapt). This option makes one browse over file system extremely fast, it
> feel like you are writing a poem. You can get anywhere as fast as you think.

I implemented option 3 now. It's no separate mode, just a command, but
you can do much with commands in ranger ^^.  I called it :scout.  There
is no default key binding for it yet, you can create one by adding this
to your rc.conf:

"map F console scout "
(Without quotes. Note the trailing whitespace)

It allows you to move to the parent directory by typing "." and moving
to any other directory by typing part of its name.  It's not complete
yet but I'd like your input. :)

Again, (to advertise my own stuff ;P) try this. It's an extension of narrow (above) in that it chains automatically (+ more). I use this loads 'cause it's just so goddamn fast:

<code>
 
It has an added bonus of supporting ".." to move back a directory AND it automatically travels into directories. I've never needed the skip letter thing above, but now Roman Z's given his :scout implementation it shouldn't be hard and it sounds really interesting.

I'd like to make a quick apology, in a sense.

I misinterpreted the function of Roman Z's :scout because I was using the code in an older version of ranger, and didn't realise that the way it was working wasn't the way it was meant to be working. Upon fixing that I have realised that it does basically the same as my script with (as far as I can tell) two differences:

1. Mine filters whereas his searches. I'd recommend trying the filter method, as it's nicer á mon avis.
2. His has the whole modified regex support (although he really should wrap that in a try..except) whereas mine uses plain :filter-matching. I'll try and update mine.

Tally-ho!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]