You are not logged in.
Hut, is there a way to see the changelogs for the latest git release? I've tried searching for it on ranger git project site, but I can't find any info.
Offline
hi archman, the "git release" (version 1.3) is a rolling release, and I don't make change logs in text format.
But you can type this while you're inside the git repo:
git log --no-merges --oneline v1.2.1..master
Add a "-p" to see changes in the code.
As you see, there are not many new things in git, but they will keep coming.
Here's another log, not sure which one is more useful to you:
http://git.savannah.gnu.org/cgit/ranger … /?h=master
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Awesome, thanks!
Offline
Sorry for the stupid question but how can I create a new folder or new file (.txt, doc) in ranger?
Offline
There are no stupid questions.
New file: Write":touch somefilename" while in Ranger
New folder: Write ":mkdir somefoldername" while in Ranger.
Notice the ":" sign!
Cheers!
Offline
New folder
:mkdir NAME
New file
:touch NAME
Just the way you would do it in the terminal
ARRGH, too slow ... it's still morning, so I think that's the reason
Last edited by Army (2010-09-23 08:28:45)
Offline
@botzoboy you have the list of all commands by pressing :
3?
You can have more tips by reading all help sections. Press:
?
Offline
Here is a command for bulk-renaming, demonstrating what you can do with a little python knowledge. It works like this:
1. A list of selected files is opened in vim
2. You can change each filename to what you want it to rename to. When you're done, save & close the file.
3. A shell script is generated which applies your changes. It will be opened in vim too.
4. Review this script and make sure this is what you want to do, then save & close it.
5. The script will be executed and you're back in ranger.
from ranger.api.commands import Command
class bulkrename(Command):
"""
:bulkrename
This command opens a list of selected files in an external editor.
After you edit and save the file, it will generate a shell script
which does bulk renaming according to the changes you did in the file.
This shell script is opened in an editor for you to review.
After you close it, it will be executed.
"""
def execute(self):
import tempfile
from ranger.ext.shell_escape import shell_escape as esc
# Create and edit the file list
filenames = [f.basename for f in self.fm.env.get_selection()]
listfile = tempfile.NamedTemporaryFile()
listfile.write("\n".join(filenames))
listfile.flush()
self.fm.run(['vim', listfile.name])
listfile.seek(0)
new_filenames = listfile.read().split("\n")
listfile.close()
if all(a == b for a, b in zip(filenames, new_filenames)):
self.fm.notify("No renaming to be done!")
return
# Generate and execute script
cmdfile = tempfile.NamedTemporaryFile()
cmdfile.write("# This file will be executed when you close the editor.\n")
cmdfile.write("# Please double-check everything, clear the file to abort.\n")
cmdfile.write("\n".join("mv -vi " + esc(old) + " " + esc(new) \
for old, new in zip(filenames, new_filenames) if old != new))
cmdfile.flush()
self.fm.run(['vim', cmdfile.name])
self.fm.run(['/bin/sh', cmdfile.name], flags='w')
cmdfile.close()
You can put this in ~/.config/ranger/commands.py.
Select some files (with space) and type :bulkrename to test it.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
This file manager is great, it has completely replaced anything I used before. I do have one (followup) question.
As per my previous posting in this thread (page 19) I have made the :find function return false in order to not execute on a unique hit.However, I would like it to exit the commandline on a unique hit. I bet it's a really simple hack, but I can't quite wrap my head around it. I tried a couple of different things, but I'd very much like some advice on this.
And thanks again, it really is a great tool you have here.
Offline
This file manager is great, it has completely replaced anything I used before. I do have one (followup) question.
As per my previous posting in this thread (page 19) I have made the :find function return false in order to not execute on a unique hit.However, I would like it to exit the commandline on a unique hit. I bet it's a really simple hack, but I can't quite wrap my head around it. I tried a couple of different things, but I'd very much like some advice on this.
And thanks again, it really is a great tool you have here.
Hi again Visti.
You could remove the function called "execute" in your find command. (after undoing all your previous changes first)
Or at least remove the self.fm.move(right=1) and self.fm.cd(parse(self.line).rest(1)) instructions, these are responsible for executing files and entering directories.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ah, thanks. That works splendidly.
Offline
Hi
Thx so much for ranger, its truly spectacular
i have a Q.. is it possible to set by default to open all apps with the d mode (detached)?
thx alot
zeltak
Offline
Hi
Thx so much for ranger, its truly spectacular
i have a Q.. is it possible to set by default to open all apps with the d mode (detached)?
thx alot
zeltak
Hi zeltak, maybe this helps you:
pydoc ranger.defaults.apps
Edit:
Well I guess its non-trivial for non-programmers so here's a draft:
# file ~/.config/ranger/apps.py
from ranger.defaults.apps import CustomApplications as DefaultApps
from ranger.api.apps import *
class CustomApplications(DefaultApps):
def app_default(self, c):
c.flags += 'd'
return DefaultApps.app_default(self, c)
Dunno if this is exactly what you want.
But you know that it will screw up things if you start console apps like vim, right.
Last edited by hut (2010-09-30 20:59:47)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Hi Hut
thx for the tips..i have zero python ( and programming knowledge) but managed to alter my app.py to my needs
I have some bugs/suggestions/questions but couldn't find an IRC channel/Forum so im posting it here, i hope its ok. Also there are a few suggestions i have (not requests ) that if you think are beneficial/have time i think could be cool.
ill start with the bug:
I cant get the mode number and then "l" to work. Is it a known issue..am i doing something wrong? im pressing a numer and then l while on a file but that dosent seem to work, isnt that how modes are operated?
ssh/samba support? is that possible? would be cool to browse ssh with ranger
its unclear what can be done with "marked" files..is it possible to have a popup menu for marked files (similar to the bookmarks popups) so one can quick access marked files (especially config files)
it seems that documentation on how to change file types colors is lacking for dummies like me can you give an example on how for example to change the color for *.zip files?
Would be nice to have a Filter indicator when filtering is on
would be cool to have an option to remember different sort order/filter views etc per folder
sorry for the long email and thx again for your truly awesome program
Zeltak
Offline
Hi Hut
thx for the tips..i have zero python ( and programming knowledge) but managed to alter my app.py to my needs
I have some bugs/suggestions/questions but couldn't find an IRC channel/Forum so im posting it here, i hope its ok. Also there are a few suggestions i have (not requests ) that if you think are beneficial/have time i think could be cool.
There is a mailing list and a bugtracker on rangers website:
https://savannah.nongnu.org/projects/ranger
ill start with the bug:
I cant get the mode number and then "l" to work. Is it a known issue..am i doing something wrong? im pressing a numer and then l while on a file but that dosent seem to work, isnt that how modes are operated?
Thats right, a number and then "l".
You can also try typing r2<enter>
Can you please post more information? Which kind of files, which application, the relevant code from the apps.py.
ssh/samba support? is that possible? would be cool to browse ssh with ranger
For now, you're going to need tools that mount remote file systems onto the local ones. (sshfs,..)
Don't have the time/energy to safely and securely implement that in ranger.
its unclear what can be done with "marked" files..is it possible to have a popup menu for marked files (similar to the bookmarks popups) so one can quick access marked files (especially config files)
The "t" key? It's actually called "tagged" files but that doesn't matter
You can tag files which are important to you and it will just show a * next to the file. Type ct and you immediately jump to the next tagged file in this directory. "cat ~/.config/ranger/tagged" for a list of tagged files.
it seems that documentation on how to change file types colors is lacking for dummies like me can you give an example on how for example to change the color for *.zip files?
Rather than writing it here, I'm going to document it now.
EDIT:
Oh, there is some documentation already: http://git.savannah.gnu.org/cgit/ranger … chemes.txt
Basically, what you do is create a new colorscheme. You can start with the jungle-colorscheme:
mkdir ~/.config/ranger/colorschemes
cp /path/to/ranger/colorschemes/jungle.py ~/.config/ranger/colorschemes/myscheme.py
And adapt it to your likings, e.g.:
if context.container:
fg = green
You'll also need this line in options.py:
colorscheme = "myscheme"
Would be nice to have a Filter indicator when filtering is on
would be cool to have an option to remember different sort order/filter views etc per folder
Noted
sorry for the long email and thx again for your truly awesome program
Zeltak
Sorry for the long reply and thanks for your suggestions
Last edited by hut (2010-10-01 18:42:50)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Here is a command for bulk-renaming, demonstrating what you can do with a little python knowledge. It works like this:
...
You can put this in ~/.config/ranger/commands.py.
Select some files (with space) and type :bulkrename to test it.
Thx for tis example, it's demonstrate the ranger/python power and it's exactly what I miss in ranger
Can I suggest a feature :
A dynamical help format for developpers.
For example, ranger can search and compile all command.py headers formated comments to make a up to date help text.
Offline
Do you plan a python3 version anytime soon?
(because testing just put python 3.1 as the python default package)
Edit: oops, my mistake, it already is, I just had to rebuild the git package
Last edited by mathieui (2010-10-04 17:54:39)
Offline
hut wrote:Here is a command for bulk-renaming, demonstrating what you can do with a little python knowledge. It works like this:
...
You can put this in ~/.config/ranger/commands.py.
Select some files (with space) and type :bulkrename to test it.Thx for tis example, it's demonstrate the ranger/python power and it's exactly what I miss in ranger
Can I suggest a feature :
A dynamical help format for developpers.
For example, ranger can search and compile all command.py headers formated comments to make a up to date help text.
Sounds very reasonable, I'll work on it.
Do you plan a python3 version anytime soon?
(because testing just put python 3.1 as the python default package)Edit: oops, my mistake, it already is, I just had to rebuild the git package
Yep, which python version to use is determined in the PKGBUILD and ranger is designed for both 2.6 and 3.1.
On a sidenote: For me, ranger runs faster on python2.6
-------------------
Some updates:
1. Ranger is on ohloh now
2. There's a new sort algorithm, "natural sort", enable it with sort = "natural" in options.py or by typing "on". It sorts "foo.png" < "foo1.png" < "foo1423.png".
3. Ranger supports mimeopen. It's used to run files, currently just as a fallback for when apps.py is not successful in finding a program and only if you have it installed.
4. The algorithm for truncating the path in the titlebar (when it gets too long) was much improved. (you may have noticed that the previous one was TERRIBLE, never got around fixing it until now.) Try out the option dirname_in_tabs = True. It's not new, but it used to screw up the titlebar...
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Looks awesome so far, perfect for my server I think. Actually I think I'm gonna use this for my desktop too, the "new" pcmanfm sucks and qtfm is a bit slow to start up. I'll definitely give this a try. Thanks!
Offline
Great piece of software, I'm really impressed.
And I'd like to make tiny, tiny suggestion:
I'd like :cd with no arg eqivalent to :cd ~.
edit: bad tag
Last edited by vi3dr0 (2010-10-04 22:22:25)
Thinkpad T61p : T7700 | 4GB RAM | nVidia FX 570M | Intel 4965
Arch64 @ Openbox
Offline
Great piece of software, I'm really impressed.
And I'd like to make tiny, tiny suggestion:
I'd like :cd with no arg eqivalent to :cd ~.
edit: bad tag
Thanks. And :cd is supposed to work like that, but it was bugged ;_;
The fix is uploaded.
Btw. you might as well type gh
Last edited by hut (2010-10-04 23:05:35)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thx again Hut for the great tips even though i have zero python knowledge i have managed to create my own color theme and config some other stuff for my liking
i have another idea (if you dont mind)
A really useful thing IMHO would be to have an option to either remember the currents tabs (session) that were open when closing ranger or even better yet have an option to save sessions. that is lets say i have 3 tabs open (/, ~, and tmp) i could save that as a session named default and then quick launch all 3 tabs by calling on "default" with either a key combo or a : command. i think that could be super useful. I use Vimperator alot (a VI mode for firefox ) and there is something very similar there.
also how does one define what extensions go into a context (ie the container context). Currently it dosent include .deb and i would like to add that
thx again for ranger..it has become my full time file browser
best
Zeltak
Offline
also how does one define what extensions go into a context (ie the container context). Currently it dosent include .deb and i would like to add that
That would require changes in the source code:
ranger/fsobject/fsobject.py lines 16-18
I'll give the session stuff some thought.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thanks. And :cd is supposed to work like that, but it was bugged ;_;
The fix is uploaded.
That was insanely fast
Thinkpad T61p : T7700 | 4GB RAM | nVidia FX 570M | Intel 4965
Arch64 @ Openbox
Offline
Ok, here I go with another idea:
How about some filter-mode indicator? Something like that (displaying filter used at the moment) somewhere at the bottom (status bar? ).
What do you think of that?
Thinkpad T61p : T7700 | 4GB RAM | nVidia FX 570M | Intel 4965
Arch64 @ Openbox
Offline