You are not logged in.
lfm didn't crash on my system. It was pretty stable and opened ( and opens) several compressed files for me without error.
I got it to crash under one circumstance. The file could have just been bad, but it should have caught that error.
I believe this is the only option missing in ranger, otherwise it's complete in all aspects.
Fair enough....
Atleast an option should be given to enable or disable this functionality, so that who want to use it will use it and those who don't want it, they disable it.
I never said I disliked the idea. All I said was that it will take a lot of effort, and no-one's stepped up to help Hut with it.
My aside about lfm's implementation was just that - an aside comment meant to be taken humorously (but with a kernel of point). I have a feeling you took it to mean I don't want the functionality - I do want the functionality, I just don't want to put the effort in (yet; there's always next year :-P).
I only want to see this option added to ranger otherwise it covers all the functionality needed by me. And, also, i think, many would welcome this functionality if I'm not wrong.
On the basis that others have asked, you are not wrong. I don't use archives that much, though, so it wouldn't be that big of a deal to me.
Offline
Hi,
Just something I ran into, it gets annoying sometimes. When you yy and pp a directory in its parent directory, it copies itself into itself instead of renaming itself. Sorry, it's hard to explain in words.
With the example setup
/test/hi
if you are in
/
and you yy
/test
and pp into
/
you end up with
/test/hi
/test/test/hi
instead of
/test/hi
/test.~1~/hi
Is this intended behavior? It runs contrary to pasting files and is somewhat counterintuitive.
Offline
Hello!
I rename some files with the "rrname" command from my commands.py:class rrname(Command): def execute(self): filenames = [f.basename for f in self.fm.thistab.get_selection()] for f in filenames: new_name = '-' + f self.fm.rename(f, new_name) # attempt to do something with renamed files self.fm.reload_cwd() with open('out', 'w') as log: cwd = self.fm.thisdir for fileobj in cwd.files: filename = fileobj.basename log.write(str(filename))
[...]
Thank you as well for this awesome and informative reply! Another question concerning this: Would it be possible to draw small borders between the different file type groups? I'm thinking of something similar to Windows' 'group by file type' option which separates the individual groups by showing small borders: Screenshot (Image found via Google, source is here, I don't own a copy of Windows to reproduce this, sorry.)
Offline
Hi there!
I recently discovered slmenu, a dmenu clone for the console.
I wanted to use it in ranger, in this function I added to my options.py:
class locate(Command):
"""
:locate <name_part>
Search in current directory and subdirs for a file whose name contains the
given string (case insensitive) and prompt for the one to select in ranger
using slmenu (press escape 2 times to cancel).
"""
def execute(self):
import subprocess
from ranger.core.loader import safeDecode
import sys
import os.path
if self.rest(1):
command = 'find . -iname ' + shell_quote('*' + self.rest(1) + '*') + \
'| slmenu -t -i -l $(($(tput lines)-1)) -p locate '
self.fm.ui.suspend()
try:
p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
filename = p.communicate()[0]
finally:
self.fm.ui.initialize()
if p.poll() == 0: # no error returned
if sys.version >= '3':
filename = safeDecode(filename)
# remove the newline
filename = filename.rstrip('\n')
# make the path absolute
filename = os.path.join(self.fm.thisdir.path, filename.lstrip('./'))
# select the file
self.fm.select_file(filename)
else:
self.fm.notify('usage: locate <name_part>', bad=True)
There is the problem: the line self.fm.select_file(filename) changes the working directory but does not select the file.
Is there something I missed?
Edit: fm.select_file() works better with an absolute path.
Code above is fixed.
Last edited by PotatoesMaster (2012-10-30 11:08:41)
Offline
Hi,
just a quick question:
i use btrfs and copying a file in ranger doesn't use copy-on-write, i.e. the file is just copied and therefore wasting space.
In the terminal, i use the alias 'alias cp="cp --reflink=auto"' in my bashrc to enable copy-on-write.
How can i configure ranger to use the cp option "--reflink=auto"? I could modify actions.py. But the problem with this solution is that i'll have to modify actions.py everytime ranger is updated.
ccc1
Offline
Hi,
just a quick question:
i use btrfs and copying a file in ranger doesn't use copy-on-write, i.e. the file is just copied and therefore wasting space.
In the terminal, i use the alias 'alias cp="cp --reflink=auto"' in my bashrc to enable copy-on-write.
How can i configure ranger to use the cp option "--reflink=auto"? I could modify actions.py. But the problem with this solution is that i'll have to modify actions.py everytime ranger is updated.
The problem here is that Ranger moved to an internal copy system in order to have progress bar support. This would only work if we actually copied. The only option is to make your own command to use the built-in cp.
Fortunately it should be as simple as map pp shell cp --reflink=auto -- %c in your rc.conf [COMPLETELY UNTESTED].
However, you lose a lot of the benefits that the new (and previous implementations) have, so you'd likely want something more complex.
Offline
Ok, i see. Then i'll just use the command line if i want to copy a file with copy-on-write. Isn't such a big deal.
ccc1
Offline
Hello!
First of all, thank you, @hut, for cm/ca key fix, in works perfect.
Also I have to confess, some new "features" drove me here again. Hope my report will help you to make ranger even more better.
1. Strange behaviour of %S:
Conditions:
Have files:
/tmp/testdir/testfile1
/tmp/testfile2
Do:
1. :cd /tmp/testdir/
2. :tab_new %d
3. <tab> to get the previous tab back
4. <h> to uplevel
5. some <j> of <k> to stay on testfile2
6. <tab> to switch tabs again
7. :shell -w echo %S
got /tmp/testdir/ instead of /tmp/testfile2
2. Not sure if bug, but just in case:
If I do
:tab_new %%d
ranger crashes:
ranger version: 1.5.5, executed with python 2.7.3rc2
Locale: en_US.UTF-8
Current file: None
Traceback (most recent call last):
File "/home/loop/.ranger/ranger/core/main.py", line 130, in main
fm.loop()
File "/home/loop/.ranger/ranger/core/fm.py", line 263, in loop
ui.redraw()
File "/home/loop/.ranger/ranger/gui/ui.py", line 248, in redraw
self.draw()
File "/home/loop/.ranger/ranger/gui/ui.py", line 274, in draw
DisplayableContainer.draw(self)
File "/home/loop/.ranger/ranger/gui/displayable.py", line 254, in draw
displayable.draw()
File "/home/loop/.ranger/ranger/gui/widgets/titlebar.py", line 39, in draw
self._calc_bar()
File "/home/loop/.ranger/ranger/gui/widgets/titlebar.py", line 84, in _calc_bar
self._get_left_part(bar)
File "/home/loop/.ranger/ranger/gui/widgets/titlebar.py", line 106, in _get_left_part
self.fm.thisdir.path.startswith(self.fm.home_path):
AttributeError: 'NoneType' object has no attribute 'path'
Offline
Hi,
I'm relatively new to textbased file managers but have tested some of them over the last couple of days and I really really like ranger.
Unfortunately (and I know that's contrary to the whole idea) I don't really like editing my code files with vim.
How can I customize ranger to use a different (non terminal based) editor for editing files so that it open's them in a new window?
-CREED0R
@Edit:
Never mind, I figured it out. In 'apps.py' I changed
return self.either(c, 'vim', 'emacs', 'nano')
to
return self.either(c, 'sublime', 'vim', 'emacs', 'nano')
Great FM!
Last edited by CREED0R (2012-11-24 14:28:57)
Offline
@CREED0R
Also you can use ~/.config/ranger/rifle.conf for filetype associations (development version of ranger).
Last edited by loop (2012-11-24 19:26:00)
Offline
I'm having trouble cutting(dd) and pasting(pp) large files (>800MB) to a mounted network share. 5-10 % of the file is stored to the new location, the old file still exists after op. any ideas? any information I can provide?
Offline
^ Bug or not, it looks cool
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
[marquee][blink]NOTE[/blink][/marquee]: the chances for a quick reply (from me) are higher if you use the "official channels", which are the mailing list ( https://lists.nongnu.org/mailman/listinfo/ranger-users ) and the bug tracker ( http://savannah.nongnu.org/bugs/?group=ranger ).
When the option draw_borders is set to True and option padding_right to False, two vertical lines are used to separate columns:
http://ompldr.org/tZ2d2bgdraw_borders = True padding_right = False
Is it a bug?
I guess "draw_borders = True" is really only supported with "collapse_preview = False". It looks broken for me if I don't turn off the latter option. (ranger-1.5.5-master). I'll fix it at some point.
I'm having trouble cutting(dd) and pasting(pp) large files (>800MB) to a mounted network share. 5-10 % of the file is stored to the new location, the old file still exists after op. any ideas? any information I can provide?
Does it happen every time? Maybe you stop the transfer with ctrl+C? Does it work with "!cp %c ." (while you are in the target directory in ranger)?
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Notwithstanding the above message, just a simple question, any way to have completion of shell commands? It seems it SHOULD be supported but the only completions I get are file names, not other shell completion (for example the options for netcfg etc.).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Notwithstanding the above message, just a simple question, any way to have completion of shell commands? It seems it SHOULD be supported but the only completions I get are file names, not other shell completion (for example the options for netcfg etc.).
There's no bash (or any other shell) embedded in ranger, so it would have to parse the completion files and make sense of them somehow. The place to put this code in would be the function "tab" of the class "shell" in ~/.config/ranger/commands.py but I wouldn't know what to write since i have no experience with autocompleting options of programs in the shell.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hello,
I'm trying to open all text file (wich are open with VIM) in another terminal (to keep Ranger open and usable).
For that, I tried to change in apps.py the method app_editor() by adding just before the return line : c += 'td'.
That don't work (as you can guess...), and I don't understand why. Someone can help me?
Thank you in advance,
Denis
Offline
ngoonee wrote:Notwithstanding the above message, just a simple question, any way to have completion of shell commands? It seems it SHOULD be supported but the only completions I get are file names, not other shell completion (for example the options for netcfg etc.).
There's no bash (or any other shell) embedded in ranger, so it would have to parse the completion files and make sense of them somehow. The place to put this code in would be the function "tab" of the class "shell" in ~/.config/ranger/commands.py but I wouldn't know what to write since i have no experience with autocompleting options of programs in the shell.
Thanks, I guess I'll just keep the shell open elsewhere then. Which makes me think of a feature request, would here be better or the bug tracker?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Hello,
I'm trying to open all text file (wich are open with VIM) in another terminal (to keep Ranger open and usable).
For that, I tried to change in apps.py the method app_editor() by adding just before the return line : c += 'td'.That don't work (as you can guess...), and I don't understand why. Someone can help me?
Thank you in advance,
Denis
Denis, maybe you need to use rifle.conf file instead apps.py
Create the default one:
ranger --copy-config
edit
vim ~/.config/ranger/rifle.conf
find the "text file" part (line 27?)
# Define the "editor" for text files as first action
...
The first command line is the default one.
The other line appear in the menu (when you press "l" for this file type) if conditions are true.
So you can modify the first one to add a flag ft
mime ^text, label editor, flag ft = "$EDITOR" -- "$@"
Offline
Thanks!
I finally achieve my goal by chaging in rifle.conf the mime line :
mime ^text, label editor, flag f = xterm -e vim "$@"
Offline
hut wrote:ngoonee wrote:Notwithstanding the above message, just a simple question, any way to have completion of shell commands? It seems it SHOULD be supported but the only completions I get are file names, not other shell completion (for example the options for netcfg etc.).
There's no bash (or any other shell) embedded in ranger, so it would have to parse the completion files and make sense of them somehow. The place to put this code in would be the function "tab" of the class "shell" in ~/.config/ranger/commands.py but I wouldn't know what to write since i have no experience with autocompleting options of programs in the shell.
Thanks, I guess I'll just keep the shell open elsewhere then. Which makes me think of a feature request, would here be better or the bug tracker?
Go ahead and abuse the bug tracker as feature request tracker
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
[marquee]
I guess "draw_borders = True" is really only supported with "collapse_preview = False". It looks broken for me if I don't turn off the latter option. (ranger-1.5.5-master). I'll fix it at some point.
ryzion wrote:I'm having trouble cutting(dd) and pasting(pp) large files (>800MB) to a mounted network share. 5-10 % of the file is stored to the new location, the old file still exists after op. any ideas? any information I can provide?
Does it happen every time? Maybe you stop the transfer with ctrl+C? Does it work with "!cp %c ." (while you are in the target directory in ranger)?
The error seemed to occur due to false permissions. The target directory was ro ... still don't understand why ranger copied the first 10%....
Something completely different: Is it possible to yank a selection in multiple directories? eg: file "foo" in home and file "bar" in /home/dir?(booth files are selected via <space>
Offline
Something completely different: Is it possible to yank a selection in multiple directories? eg: file "foo" in home and file "bar" in /home/dir?(booth files are selected via <space>
Yes it is possible with 'ya' hotkey (yank add). Same way you can use 'da' to add files for mooving.
Offline
Hi,
Ranger seems unable to sort 'week10' after 'week9' (both of them are directories). I've tried
toggle_option sort_directories_first
Offline
Hi,
Ranger seems unable to sort 'week10' after 'week9' (both of them are directories). I've tried
toggle_option sort_directories_first
make sure that this is in your options.py (it's there by default in recent versions):
sort = "natural"
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline