You are not logged in.

#1926 2015-03-31 20:20:37

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

Re: Ranger, a textbased filemanager

So, ranger has been around for almost 6 years, and after all this time of optimizing and re-evaluating, I think we need a paradigm shift in the way ranger works.

There are going to be a few changes starting with the upcoming 1.7.0 release which can be tested now already by running the current git version:

git clone https://github.com/hut/ranger.git -b current
cd ranger
./ranger.py

I sincerely believe now that trying to copy the vim user experience was wrong on many levels, because clearly emacs is the better editor.  It's build on the idea of freedom, of elegance and of having to press modifier keys all the time.

If that doesn't convince you yet, how about this:

Imagine a text editor where you can just type in some keys, and they appear on the screen.  Just like that.  No silly modes, no crazy things happening by typing random characters on the keyboard (think ggdGZZ, it deletes your whole text, then saves the file and quits the editor!  How crazy is that?!)

No.  Using Emacs key bindings is the only sane way to do it.  Check out the new key bindings on the man page: http://ranger.nongnu.org/ranger.1.html

Of course ranger has no concept of "typing in text" like emacs does, so typing in keys without modifiers will do nothing at all.  Basically you will have to use modifier keys for everything you do.  But still it's obviously better than vim-like key bindings.  ***BONUS*** The first 100 to upgrade will get a free treatment for their future carpal tunnel syndrome!

PS: Here is the full changeset: https://github.com/hut/ranger/commit/09 … 495cf75ec3

Last edited by hut (2015-03-31 20:24:16)


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

Offline

#1927 2015-03-31 20:37:00

hnsn
Member
Registered: 2013-02-19
Posts: 4

Re: Ranger, a textbased filemanager

epic.

btw, thanks for a fantastic piece of software!

Offline

#1928 2015-03-31 20:40:15

NoSuck
Member
Registered: 2015-03-04
Posts: 157
Website

Re: Ranger, a textbased filemanager

hut wrote:

Check out the new key bindings on the man page: http://ranger.nongnu.org/ranger.1.html

I did.  Now I have RSI.

Offline

#1929 2015-03-31 20:40:28

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

Re: Ranger, a textbased filemanager

Yes! yes! yes! Brilliant work as always, hut!


@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

#1930 2015-03-31 20:45:15

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

Re: Ranger, a textbased filemanager

Waouh 2 hours a 40mn more and I guess it was an April Fools' Day ...

Maybe you can provide and maintain the 2 paradigms via conf files ?

Otherwise big kudo and thank you very much for all of your hard work during all this year.

Offline

#1931 2015-04-01 02:19:15

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

Re: Ranger, a textbased filemanager

Wow that must have taken a lot of effort. Absolutely brilliant. I'm sure someone will install ranger-git and then freak out. Not even dired dares uses emacs keybindings lol.

Offline

#1932 2015-04-01 13:45:38

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

Re: Ranger, a textbased filemanager

The link to an actual Git commit really tops this off. tongue And thanks for the years of work, hut. Every *nix OS I've used in the last few years has had Ranger installed on it, from Linux Mint to FreBSD to OS X.

Offline

#1933 2015-04-01 16:13:59

andya
Member
Registered: 2014-10-20
Posts: 10

Re: Ranger, a textbased filemanager

And then they found out the actual joke is that it’s not a joke big_smile

Offline

#1934 2015-04-01 18:44:44

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: Ranger, a textbased filemanager

As an emacs user I protest!!!  lol


You can like linux without becoming a fanatic!

Offline

#1935 2015-04-01 22:48:36

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

Re: Ranger, a textbased filemanager

Thank you for your supportive words smile

I am happy that you were so enthusiastic about the conversion to Emacs-like key bindings. That makes it harder for me to disappoint you though, because for the time being, ranger will revert back to having vim-like key bindings. It sucks, I know, but let's be honest, vim really is the better editor. =P

By the way, a lot of fun has been generated on the mailing list, in the thread "A new approach to build the user interface of the future!":
- Part 1: https://lists.nongnu.org/archive/html/r … reads.html
- Part 2: https://lists.nongnu.org/archive/html/r … reads.html
(silly archive viewer breaks threads between months)

P.S. since the emacs conversion was fully functional, it will continue to exist in the "emacs" branch!

Last edited by hut (2015-04-01 22:49:54)


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

Offline

#1936 2015-04-02 07:59:03

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: Ranger, a textbased filemanager

By the way, a lot of fun has been generated on the mailing list, in the thread

Yes my favourite was;

From:     Andres MRM
I see that like a great change!
I always mistype using Vim key bindings, doing bad things with my files.
You could add ALL modifiers before any command to avoid that. Like:
- Ctrl+Alt+Meta+Shift+AltGr+up to go up.
- Ctrl+Alt+Meta+Shift+AltGr+down to go down.
That will probably help a lot! big_smile

Maybe we will lack fingers... but that can be an opportunity to interact more
with people. Like "Hey, could you please help me by pressing
LShift+LCtrl+LMeta so I can press RShift+RCtrl+RMeta+RAlt+Delete to delete a
file?". I see great friendships, and, why not, love stories starting that way!

But really, why not keep a more emacs oriented version - it would be interesting to see which I prefer as I use emacs and vim but prefer emacs!

Last edited by chickenPie4tea (2015-04-02 07:59:52)


You can like linux without becoming a fanatic!

Offline

#1937 2015-04-10 13:18:11

PieterGen
Member
From: Groningen, NL, EU
Registered: 2012-01-18
Posts: 59

Re: Ranger, a textbased filemanager

chickenPie4tea wrote:

By the way, a lot of fun has been generated on the mailing list, in the thread

Yes my favourite was;

From:     Andres MRM
I see that like a great change!
I always mistype using Vim key bindings, doing bad things with my files.
You could add ALL modifiers before any command to avoid that. Like:
- Ctrl+Alt+Meta+Shift+AltGr+up to go up.
- Ctrl+Alt+Meta+Shift+AltGr+down to go down.
That will probably help a lot! big_smile

Maybe we will lack fingers... but that can be an opportunity to interact more
with people. Like "Hey, could you please help me by pressing
LShift+LCtrl+LMeta so I can press RShift+RCtrl+RMeta+RAlt+Delete to delete a
file?". I see great friendships, and, why not, love stories starting that way!

LOL. :-) :-)   Thank you Hut, you have made a great file manager, that you have maintained for a very long time (kudos!) and now you show a great sense of humour as well ! I really like ranger, to me it's certainly superior to a GUI filemanager (I've used nautilus, spacefm, dolphin, thunar, and at work I'm forced to use windows including its 'explorer') while being quicker and easier than coreutils.

Last edited by PieterGen (2015-04-10 13:18:34)

Offline

#1938 2015-04-14 00:24:37

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

Re: Ranger, a textbased filemanager

Thanks smile

In other news, I am pleased to announce the release of ranger verison 1.7.0!  It contains a bunch of bugfixes and new features, all of which were previously on the master branch in git for you to try out.

https://github.com/hut/ranger/tree/v1.7.0

There is also an emacs-like version of the release: (yes, really!)

https://github.com/hut/ranger/tree/v1.7.0-emacs

Here are some reactions to the release:

"Nice"
    -- Anonymous

"It's good, I guess"
    -- Anonymous

"What?"
    -- Anonymous

And the change log:

* The default editor is now "vim" instead of "nano" [unless you use the emacs branch where the default editor is, of course, "emacs"]
* Added automatic updates of tags when a file is renamed from within ranger
* Added "preview_images_method" which can be set to "iterm2" to use native iTerm2 image previews
* Added ":rename_append" command to rename files without the file extension
* Added ":linemode" command to change the way the files are displayed. Try this out by pressing M followed by one of the suggested keys. New linemodes can be added with ranger.api.register_linemode().
* Added ":filter_inode_type" command to only show directories, files or links
* Added ":meta" command for managing custom file metadata
* Added ":flat" command for displaying subdirectories
* Added "solarized" colorscheme
* Added generic ability to use scope.sh for image previews
* Added video previews in scope.sh
* Added option "sort_unicode" to sort according to unicode, not ASCII
* ":mkdir" can now create multiple directory levels (like `mkdir -p`)
* ":help" (key binding "?") is now interactive
* ":find" (key binding "/") is now case insensitive by default
* "ranger --copy-config=all" now copies a short sample commands.py rather than the full one, so that you can update ranger without having broken commands. The full commands.py is still copied to ~/.config/ranger/commands_full.py.
* Fixed broken copying of symlinks

Last edited by hut (2015-04-14 19:02:24)


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

Offline

#1939 2015-04-14 18:21:47

Ambrevar
Member
Registered: 2011-08-14
Posts: 212
Website

Re: Ranger, a textbased filemanager

Erratum: command is ":filter_inode_type", not ":filter_by_inode".

Good job, thanks a load! I love the "flat" command!

Offline

#1940 2015-04-14 18:30:44

sekret
Member
Registered: 2013-07-22
Posts: 289

Re: Ranger, a textbased filemanager

Hmm, pressing the delete key doesn't show up :delete as it did before.

Offline

#1941 2015-04-14 19:03:24

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

Re: Ranger, a textbased filemanager

Ambrevar: oops, thank you!

sekret: echo 'map <delete> console delete' >> ~/.config/ranger/rc.conf


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

Offline

#1942 2015-04-14 21:34:28

Ambrevar
Member
Registered: 2011-08-14
Posts: 212
Website

Re: Ranger, a textbased filemanager

Adapted an old mkcd command to make use of the new makedirs:

class mkcd(Command):
    """
    :mkcd <dirname>

    Creates a directory with the name <dirname> and enters it.
    """

    def execute(self):
        from os.path import join, expanduser, lexists
        from os import makedirs
        import re

        dirname = join(self.fm.thisdir.path, expanduser(self.rest(1)))
        if not lexists(dirname):
            makedirs(dirname)

            match = re.search('^/|^~[^/]*/', dirname)
            if match:
                self.fm.cd(match.group(0))
                dirname = dirname[match.end(0):]

            for m in re.finditer('[^/]+', dirname):
                s = m.group(0)
                if s == '..' or (s.startswith('.') and not self.fm.settings['show_hidden']):
                    self.fm.cd(s)
                else:
                    ## We force ranger to load content before calling `scout`.
                    self.fm.thisdir.load_content(schedule=False)
                    self.fm.execute_console('scout -ae ^{}$'.format(s))
        else:
            self.fm.notify("file/directory exists!", bad=True)

I'm no python guru, so if you have any feedback, you are welcome smile

Offline

#1943 2015-04-15 01:20:39

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

Re: Ranger, a textbased filemanager

Here's a guide on how to enable video previews, btw: https://github.com/hut/ranger/wiki/Video-Previews

Ambrevar, you should add your command to https://github.com/hut/ranger/wiki/Commands ! smile


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

Offline

#1944 2015-04-15 05:58:29

Ambrevar
Member
Registered: 2011-08-14
Posts: 212
Website

Re: Ranger, a textbased filemanager

Done! Also added a

toggle_flat

command smile
I fixed a typo in your video-previews article.

Offline

#1945 2015-04-15 20:20:50

melody
Member
Registered: 2015-04-15
Posts: 19

Re: Ranger, a textbased filemanager

Hey. I love ranger and I think that the ranger preview for pictures is really great. But it doesn't work as it should with transparent terminals. Images that don't fit in the screen are all screwed up. "Set draw_borders" solves this. But the border takes too much space away and when you preview an image a part of the border disappears.

set draw_borders false:

http://pix.toile-libre.org/upload/origi … 121491.png

set draw_borders true:

http://pix.toile-libre.org/upload/origi … 122229.png

Offline

#1946 2015-04-15 22:10:32

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

Re: Ranger, a textbased filemanager

melody wrote:

Hey. I love ranger and I think that the ranger preview for pictures is really great. But it doesn't work as it should with transparent terminals. Images that don't fit in the screen are all screwed up. "Set draw_borders" solves this.[…]

Does "set draw_borders" solved it? There's a small strip of stuff – presumably the lower portion of the image – at the bottom of your preview area in both screenshots.

Also, hut, I'm loving the new video previews, but is it possible to make scope.sh show more than one thing in the preview? I'd like to have both an image and its mediainfo in there.


@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

#1947 2015-04-16 06:01:28

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: Ranger, a textbased filemanager

I think there is a bug in the list rendering code, which causes a strip in the image preview.

Investigating...


"After you do enough distro research, you will choose Arch."

Offline

#1948 2015-04-16 08:27:56

melody
Member
Registered: 2015-04-15
Posts: 19

Re: Ranger, a textbased filemanager

Miblo wrote:

Does "set draw_borders" solved it? There's a small strip of stuff – presumably the lower portion of the image – at the bottom of your preview area in both screenshots.

Also, hut, I'm loving the new video previews, but is it possible to make scope.sh show more than one thing in the preview? I'd like to have both an image and its mediainfo in there.

"Set draw_borders" solves the transparent bar on the image.

The small strip at the bottom shows in both scenarios.

Offline

#1949 2015-04-19 01:53:42

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

Re: Ranger, a textbased filemanager

Check out the new cheat sheet (png: http://ranger.nongnu.org/cheatsheet.png, svg: http://ranger.nongnu.org/cheatsheet.svg)

cheatsheet_thumb.png

It can be found at http://ranger.nongnu.org/documentation.html or in the repo under doc/cheatsheet.svg.

Suggestions and bug fixes appreciated.

Last edited by hut (2015-04-19 01:54:49)


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

Offline

#1950 2015-04-19 21:44:18

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

Excellent!

Offline

Board footer

Powered by FluxBB