You are not logged in.
I think that was fixed a while ago, try upgrading.
Yep, works now.
In IRC you asked me if you can use UTF chars for input and I couldn't answer.
Apparently that works only with python2.6, and you gotta add this line at the top of your keys.py if it's not already there:# -*- coding: utf-8 -*-
If you wanna install ranger with python2.6, edit the PKGBUILD, it gives you some hints.
Thanks!
Offline
I found something strange! I have a simple text file in the following folder: /home/army/Uni/WS10/Fachdidaktik Physik The file is called chef and contains an email adress. File shows me
% file chef
chef: ASCII text
But ranger doesn't preview the text file. When I rename it to something else, e.g. boss or whatever, ranger previews the file.
I don't understand why ranger makes a difference between the same file with different file names.
Offline
I found something strange! I have a simple text file in the following folder: /home/army/Uni/WS10/Fachdidaktik Physik The file is called chef and contains an email adress. File shows me
% file chef chef: ASCII text
But ranger doesn't preview the text file. When I rename it to something else, e.g. boss or whatever, ranger previews the file.
I don't understand why ranger makes a difference between the same file with different file names.
Have you tried turning it off and on again?
EDIT: I thought the problem is that ranger doesn't update its cache. but I just tried it out and it works (for me). So, I don't really know.
Last edited by hut (2010-10-18 22:15:10)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I restarted ranger, that didn't help. But after a complete system reboot everything's fine again... Seems like that was just one of these things which happen from time to time... It happens for me about once a year, that when I boot my laptop, nothing seems to work. Then after a reboot everything's fine.
Offline
Btw. Army, can you try out tiv again? I recently made changes to ansi.py that might have fixed tiv but I got no 256-color terminal to test it.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ah nice! I tried it, but it doesn't work. The normal preview shows nothing at all and when I press F3 I see parts of ansi codes blinking in the terminal.
Could it be that img2txt now produces better previews? I did an update of ranger a few days ago and didn't take a look at the changes, but it seemed to me like those previews look better (more details, better fitting colors). I really like it!
Offline
Yeah . I doubled the number of background colors.
Or to be honest, I fixed a ranger bug that halved the number of background colors.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
hi, hut,
After recent upgrade (about python), I can not run ranger anymore.
the error message is:
[~:henry 12:30]$ ranger
Traceback (most recent call last):
File "/usr/bin/ranger", line 50, in <module>
import ranger
ImportError: No module named ranger
How can I fix this?
thanks for your help and great works.
BR,
Henry
Offline
You can fix this by reinstalling ranger
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi Hut
short stupid Question: is it possible to yank (copy) the path to the clipboard?
thx
zeltak
Last edited by zeltak (2010-10-21 19:35:41)
Offline
The path of the file at the cursor? Try this key binding:
map('yp', fm.execute_console('echo %d/%f | xclip -i')
I hope you can figure out how to edit keybindings by yourself. If not, ask again
EDIT:
Sorry that should've been:
map('yp', fm.execute_console('shell echo %d/%f | xclip -i')
And obviously you will need the program "xclip" for that.
EDIT2:
Yes, of course, add another ) at the end.
map('yp', fm.execute_console('shell echo %d/%f | xclip -i'))
Last edited by hut (2010-10-21 21:23:11)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
thx
ill try that when i get home.
zeltak
Offline
Edit:
in the above code it ended with one ) looking at the other examples i saw they ended with )) . added it and ranger starts..but it dosent seem to be copying the path to the clipboard
thx
zeltah
Hi again
putting this line in the keys.py wont let ranger start:
map('yp', fm.execute_console('shell echo %d/%f | xclip -i')
what am i doing wrong (see erroe below)?
Traceback (most recent call last):
File "/usr/lib/python3.1/site-packages/ranger/core/main.py", line 74, in main
load_settings(fm, arg.clean)
File "/usr/lib/python3.1/site-packages/ranger/core/helper.py", line 109, in load_settings
import keys
File "/home/zeltak/.config/ranger/keys.py", line 408
^
SyntaxError: invalid syntax
Last edited by zeltak (2010-10-21 21:20:06)
Offline
1. You were right about the ).
2. You put the map(...) at the wrong place. Look for the "browser" context.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Here's my .config/ranger/keys.py with the above 'yp' binding to yank the current path (modified to suppress the line feed and to use xsel):
from ranger.api.keys import *
map = keymanager.get_context('browser')
# map 'yp' to yank the current filename path to the clipboard
map('yp', fm.execute_console('shell echo -n %d/%f | xsel -i'))
Scott
Offline
Maybe use "shell -d echo -n ..." to avoid the short flicker
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
thx hut and scott
works like a charm man ranger dosent stop to amaze me of its endless possibilities..
IMHO should be part of base ranger but its pretty easy to add
I also added 2 more option in case any one is interested, here is my config
# map 'yp' to yank the current filename path to the clipboard
#copy full path of current dir
map('yp', fm.execute_console('shell -d echo -n %d | xsel -i'))
#copy only file name
map('yn', fm.execute_console('shell -d echo -n %s | xsel -i'))
#copy filename and full path
map('yf', fm.execute_console('shell -d echo -n %d/%f | xsel -i'))
thx again
Zeltak
Last edited by zeltak (2010-10-22 00:06:16)
Offline
Good job guys!! Hut, I also recommend to include these commands by default, they are VERY handy!
Offline
Any words on stability of ranger-git? And the yy/pp mechanism in particular?
include these commands by default
Yeah I can do that.
map('yn', fm.execute_console('shell -d echo -n %s | xsel -i'))
I dunno if you deliberately used %s here but let me warn you that %s represents all selected files, not necessarily the one below the cursor.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi hut and the rest of the gang
I would love to get suggestions on what people that are using ranger do with archives. I find its really the only missing thing i keep bumping into using ranger. Is there any chance VFS (like in MC, krusader etc..) will be implemented in the future? will there be perhaps a native command to unpack here or unpack to a specific dir? if VFS will be implemented i could just use y and p to copy and paste from archives i guess. are there alternative solution? would love to hear how you guys deal with archives
thx in advance
Zeltak
Last edited by zeltak (2010-10-23 19:00:32)
Offline
I'm using the default "atool" for displaying and extracting archive content, and thats basically all I need.
For creating archives, there's @apack file.tar.gz
virtual file systems are planned but it's low priority atm.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
there is some cheat sheet for ranger?
I have compiled a few:
/ Used to search
f Quick navigation entering only a part of the file
gg moved to the top
G moves to the end
S open a console in the current directory
y copy what SELECTED
dd cut the selected
pp paste the selected
mX create a bookmark with the name X
'X moves the marker X
m marker opens a popup
Spacebar mark a file
gn open a new tab
gN tab moves N
TAB moves between tabs
:delete Delete a file
:rename Rename a file
Ctrl + H to view hidden files
w see ongoing operations
r opens the file with an application to choose
source: http://paraisolinux.com/administrador-d … la-ranger/
there is any easiest way to delete files than :delete?
Offline
You can type :d<tab>
Or maybe <F8>y
Because :delete is dangerous, there is no shorter command
Also, "cw" is faster than ":rename"
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
y copy what SELECTED
Actually it's yy (was a typo, right?)
Offline