You are not logged in.
Personally I'd fine j/k wrapping to be more a pain in the ass than anything tbh. If you start assigning basic motions different than vim, it's going to screw up lots of people.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
It's not much work, actually you can implement it in your key config.
Replace the KEY_UP mapping with a function that either moves up by 1 or moves to the bottom, depending on whether you're at position 0 or not. (the current position is accessible via arg.fm.env.cwd.pointer, the lowest possible position is len(arg.fm.env.cwd.files) - 1. Same for KEY_DOWN.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Great work on ranger.
I would love to see a trash can such as vifm has. This would make things much safer, and then "dd" could work as expected.
Offline
If you decide to include trash support, please make it optional!
Who needs trash anyway?
Offline
If you decide to include trash support, please make it optional!
Who needs trash anyway?
+1
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline
Started using this software, and I really like it. The simplicity is just to cope after...
Good job on the software
Offline
great software i very appreciate !
nonetheless, the configuration was over-complicated (especially compared to vifm).
this is what is used for default opening a animated gif file:
FILETYPE=gif=gif=gifview -a
i think using pure python to configure is not a good idea, but it's only a suggestion !
maybe use a YAML parser for this ..?
YAML has the fame for clear writings and readings, which is perfect for conf files.
Offline
nonetheless, the configuration was over-complicated (especially compared to vifm).
after keen trial i find it is also easy enough, nvm what i said.
Offline
Great work on ranger.
I would love to see a trash can such as vifm has. This would make things much safer, and then "dd" could work as expected.
Hm. I have this feature in the ruby branch but didn't port it to the new python version. I guess I found it inconvenient that my files disappear when I "dd" them. Just marking them as "cut" is more similar to what other filemanagers do. (except vifm ) It was especially annoying when the cut files were relatively big and on a different filesystem than your ~/.trash, because that means they have to be copied first.
I'll think about providing an optional keybinding which gives you this feature though.
the configuration was over-complicated (especially compared to vifm).
I need the flexibility! =P
Anyway, I will make the keys.py simpler soon but the apps.py will stay that way. If one wants a simpler configuration for that, one could just use something like mimeo or xdg-open on every file, they have an easier configuration, though less customizable.
Last edited by hut (2010-04-16 10:53:13)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I need the flexibility! =P
Anyway, I will make the keys.py simpler soon but the apps.py will stay that way. If one wants a simpler configuration for that, one could just use something like mimeo or xdg-open on every file, they have an easier configuration, though less customizable.
actually, after tracing your code i find it is really beautiful !
i suspect the CustomApp class is a polymorphism practice ?
you don't need to fix it, i was wrong.
Offline
Great work on ranger.
I would love to see a trash can such as vifm has. This would make things much safer, and then "dd" could work as expected.
The problem of having "dd" work as expected is that it would move the files to the trash directory on every "dd", adding significant overhead, especially when working between drives.
Offline
OK, perhaps it's better without a trash can. But I'd like to bind keys to scripts or sequences of commands. That way, one could bind "DD" to "mv %f ~/.Trash".
Secondly, it would be nice to be able to define commands, to execute with ":", and these could take the current file or selection as input.
Maybe this is already possible, but I don't know how.
Offline
take look at ranger/defaults/keys.py and commands.py.
The current selection is obtainable with fm.env.get_selection()
To run shell commands, you can use fm.run(). For example:
@map('DD')
def movetotrash(arg):
arg.fm.run(["mv"] + arg.fm.env.get_selection() + ["~/.Trash"])
(not tested)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
take look at ranger/defaults/keys.py and commands.py.
The current selection is obtainable with fm.env.get_selection()
To run shell commands, you can use fm.run(). For example:@map('DD') def movetotrash(arg): arg.fm.run(["mv"] + arg.fm.env.get_selection() + ["~/.Trash"])
(not tested)
Thanks! Now ranger is much more useful for me.
Offline
hut wrote:take look at ranger/defaults/keys.py and commands.py.
The current selection is obtainable with fm.env.get_selection()
To run shell commands, you can use fm.run(). For example:@map('DD') def movetotrash(arg): arg.fm.run(["mv"] + arg.fm.env.get_selection() + ["~/.Trash"])
(not tested)
Thanks! Now ranger is much more useful for me.
This doesn't work, but I can play around with it.
Offline
This works better:
@map('DD')
def movetotrash(arg):
arg.fm.run("mv " + str(arg.fm.env.get_selection()[0]) + " ~/.Trash")
since arg.fm.env.get_selection() returns a vector of file objects. I took the first one, and then turned it into a string.
Offline
The following will move all selections to trash, not just the first file
@map('DD')
def movetotrash(arg):
commands = ["mv " + str(f) + " /home/carl/.Trash/" for f in arg.fm.env.get_selection()]
[arg.fm.run(c) for c in commands]
Offline
you should probably do
from ranger.ext.shell_escape import shell_quote
somewhere and change str(f) to shell_quote(str(f)). Otherwise spaces in filenames will screw up the script.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
It would be nice if programs opened in the background, without temporarily disabling ranger. For example, I might want to open an html file with firefox, and then edit it too.
Offline
I have more bookmarks than there's room for in the popup box. We should be able to adjust the size of the box in options.py.
Offline
I have more bookmarks than there's room for in the popup box. We should be able to adjust the size of the box in options.py.
Seconded
Offline
It would be nice if programs opened in the background, without temporarily disabling ranger. For example, I might want to open an html file with firefox, and then edit it too.
Very nice idea.
Offline
That is already implemented. "firefox D" will open it detached. The reason it is not done for everything by default is that console apps are not supposed to be opened detached, as it would simply leave a process not connected to any tty.
Offline
That is already implemented. "firefox D" will open it detached. The reason it is not done for everything by default is that console apps are not supposed to be opened detached, as it would simply leave a process not connected to any tty.
Pressing "r" and entering "firefox D" opens firefox, but ranger remains blacked out and unusable. The same change in apps.py didn't work either.
Offline
Try "firefox d". In the apps.py, add c.flags += 'd' before the return [...]
I have more bookmarks than there's room for in the popup box. We should be able to adjust the size of the box in options.py.
I don't understand why you'd want to change the size of the box. You want to make it smaller? Then even less bookmarks will fit.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline