You are not logged in.
Anyone experienced that "slowness" of Ranger after some time of use without restarting it? I use Ranger in a way that it's opened 24/7, for days, and by time it gets slow while accessing bookmarks, folders and sort of...The thing gets solved when I restart it (or X, which is more often).
Any thoughts on this?
Offline
Already had it running for weeks (with laptop suspended over night) and everything was fine.
arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee
Offline
Anyone experienced that "slowness" of Ranger after some time of use without restarting it? I use Ranger in a way that it's opened 24/7, for days, and by time it gets slow while accessing bookmarks, folders and sort of...The thing gets solved when I restart it (or X, which is more often).
Any thoughts on this?
Did you notice an increase of memory usage?
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
archman-cro wrote:Anyone experienced that "slowness" of Ranger after some time of use without restarting it? I use Ranger in a way that it's opened 24/7, for days, and by time it gets slow while accessing bookmarks, folders and sort of...The thing gets solved when I restart it (or X, which is more often).
Any thoughts on this?Did you notice an increase of memory usage?
I will be testing it. it's 0.9% now and it's performing nice.
Offline
It is now at 1.2% memory usage and I start to feel the slower processing (when picking different bookmarks only, though).
Offline
Can you please type in the following key sequence and see if it gets better?
oror otob zdzd zszs zhzh
without the spaces. This should clean up the hooks of garbage collected directories.
EDIT: or just update and restart ranger, I patched it.
Dunno if this was the primary cause for the slowdown though.
Last edited by hut (2010-11-22 01:41:31)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ok, I'll be testing the latest version. It definitely gets faster when I restart Ranger.
Offline
Hey,
Is there list of all keybinding contexts? I skimmed the pydoc docs, but couldn't find anything (I'm also not familiar with python, so there).
Also, some other things:
1. I'm using a non-QWERTZ keyboard layout (NEO) and need to redefine some keybindings and aliases (main issue: hjkl is now snrt). However, when I tried the open_with command, I couldn't type the snrt keys, because they worked like the arrow keys. This is my keys.py:
from ranger.api.keys import *
# Browser keybindings
map = keymanager.get_context('browser')
map('<C-D>', fm.move(down=0.5, pages=True))
map('<C-U>', fm.move(up=0.5, pages=True))
map('N', fm.history_go(-1))
map('R', fm.history_go(1))
map('t', fm.tag_toggle())
map('T', fm.tag_remove())
#map('S', fm.execute_command(os.environ['SHELL']))
map('.', fm.search())
map(',', fm.search(forward=False))
map('Y', fm.open_console('open_with '))
# Pager keybindings
map = keymanager.get_context('pager')
map('<left>', 's', wdg.move(left=4))
map('<right>', 't', wdg.move(right=4))
# Taskview keybindings
map = keymanager.get_context('taskview')
map('R', wdg.task_move(0))
map('N', wdg.task_move(-1))
# Global keybindings
map = KeyMapWithDirections()
map('n', alias='<down>')
map('r', alias='<up>')
map('s', alias='<left>')
map('t', alias='<right>')
keymanager.merge_all(map)
Redefining the keys in the browser instead of the global context makes them work, but I'm wondering if I'm missing something here—are those keys used in some other context I'm not (yet) aware of?
2. What is the proper way to define global bindings before contextual ones without messing up the config? Again, I'm not familiar with Python. Not at all.
3. Is there a way to delete default keybindings? (I'd like to delete the default hjkl aliases, for example).
Last edited by Runiq (2010-11-23 13:51:12)
Offline
Hey,
Is there list of all keybinding contexts? I skimmed the pydoc docs, but couldn't find anything (I'm also not familiar with python, so there).
Also, some other things:
1. I'm using a non-QWERTZ keyboard layout (NEO) and need to redefine some keybindings and aliases (main issue: hjkl is now snrt). However, when I tried the open_with command, I couldn't type the snrt keys, because they worked like the arrow keys. This is my keys.py:
from ranger.api.keys import * # Browser keybindings map = keymanager.get_context('browser') map('<C-D>', fm.move(down=0.5, pages=True)) map('<C-U>', fm.move(up=0.5, pages=True)) map('N', fm.history_go(-1)) map('R', fm.history_go(1)) map('t', fm.tag_toggle()) map('T', fm.tag_remove()) #map('S', fm.execute_command(os.environ['SHELL'])) map('.', fm.search()) map(',', fm.search(forward=False)) map('Y', fm.open_console('open_with ')) # Pager keybindings map = keymanager.get_context('pager') map('<left>', 's', wdg.move(left=4)) map('<right>', 't', wdg.move(right=4)) # Taskview keybindings map = keymanager.get_context('taskview') map('R', wdg.task_move(0)) map('N', wdg.task_move(-1)) # Global keybindings map = KeyMapWithDirections() map('n', alias='<down>') map('r', alias='<up>') map('s', alias='<left>') map('t', alias='<right>') keymanager.merge_all(map)
Redefining the keys in the browser instead of the global context makes them work, but I'm wondering if I'm missing something here—are those keys used in some other context I'm not (yet) aware of?
2. What is the proper way to define global bindings before contextual ones without messing up the config? Again, I'm not familiar with Python. Not at all.
3. Is there a way to delete default keybindings? (I'd like to delete the default hjkl aliases, for example).
Hi,
1. The contexts are here:
http://nongnu.org/ranger/pydoc/ranger.c … nment.html
Easy to miss, they're at the very bottom
2. You just merge them in. If you don't want to merge in snrt into the console context, do this:
map = KeyMapWithDirections()
map('n', alias='<down>')
map('r', alias='<up>')
map('s', alias='<left>')
map('t', alias='<right>')
for context in ["browser", "pager", ...]:
keymanager.get_context(context).directions.merge(map)
rather than merge_all
Not sure if this works but it should give you the idea.
Note that there's a difference between normal mappings and direction mappings. It even confuses myself, and I'm already working on a more simple interface for creating keybindings, similar to a .vimrc
3. There's unmap:
for context in ["browser", "pager", ...]:
keymanager.get_context(context).unmap('x')
keymanager.get_context(context).directions.unmap('j')
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ah, sorry, didn't see your answer yesterday. Thanks a lot, all problems solved, all questions answered.
Offline
@hut: Seems like the update solved my problem. Thank you, doctor!
Offline
Hi, I have a couple of questions. I want to be able to do the following things:
- Spawn a new terminal at the cwd
- Run a command in such a way that I can see the output, but that I can continue doing other stuff in ranger. For example, if I run unrar on a very large file, I want to be able to see the progress but it in the meanwhile continue with ranger. I tried using the pager, but I didn't find a way of hiding and showing the pager at will.
- A while ago I asked about the incremental search. It is working ok, but when I have found the file and press enter to leave the search, ranger jumps to the next item. I have to press escape instead of enter to kill the search prompt. How can I make enter do the same?
Thanks!
Offline
1. the command :terminal runs the program x-terminal-emulator, link this to your favourite terminal emulator or edit the command.
You can also type @urxvt<enter> or something.
2. Better open a new terminal for this. I may implement it in the future though.
3. This sounds ilke a bug
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ok, thanks! I have another quick question A while ago I asked for a delete function that deletes things right away. This was the answer:
map(383, fm.open_console('delete y'))
This works, but I still need to press enter. How can I make this command get executed right away?
Offline
use execute_console instead of open_console
you can also try this one:
map(383, fm.execute_console("shell -d rm %s"))
this runs "rm" on all selected files in the background and doesn't block the terminal if you delete a lot at once
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Very nice and interesting, I use this one as my main fm instead of vifm
When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles
Offline
Any way I can recover deleted files with a ":delete" command? I've tried using lsof, but it doesn't see it...
Offline
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Ok, nvm, since I found that the file I accidentally deleted (a "conkeror.install" file that's needed in my custom conkeror package) wasn't actually needed at all.
Offline
map(383, fm.execute_console("shell -d rm %s"))
This doesn't seem to work. fm.execute('delete y') does work, however.
- A while ago I asked about the incremental search. It is working ok, but when I have found the file and press enter to leave the search, ranger jumps to the next item. I have to press escape instead of enter to kill the search prompt. How can I make enter do the same?
-----
3. This sounds ilke a bug
If you could fix this, that would be great!
Offline
- A while ago I asked about the incremental search. It is working ok, but when I have found the file and press enter to leave the search, ranger jumps to the next item. I have to press escape instead of enter to kill the search prompt. How can I make enter do the same?
-----
3. This sounds ilke a bugIf you could fix this, that would be great!
I remembered that this incremental search was a custom thing. Can you give me the code of the command or tell me the changes you made?
Also, when you say it "jumps to the next item", do you mean it goes down or right?
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
The code is:
class inc_search(search):
def quick(self):
if self.line.split(" ", 2)[1]:
search.execute(self)
When I say jump to the next item, I mean a jump to the next item that fits the search query.
Offline
Hi hut,
I switched to ranger recently. Now I'm using "ranger-git". Basically, it works fine, but after I edited a file and back to ranger, it seems get no reflect about the modified file. does ranger have the ability to track file modification?
thanks.
(edit typo)
Last edited by cap_sensitive (2010-12-11 12:32:59)
Offline
The code is:
class inc_search(search): def quick(self): if self.line.split(" ", 2)[1]: search.execute(self)
When I say jump to the next item, I mean a jump to the next item that fits the search query.
It's no bug after all. It's a flaw in the command. Since inc_search is a subclass of the search command, which does a search when you press enter, this command will also do a search when you press enter.
Try this one:
class inc_search(Command):
def quick(self):
split = self.line.split(" ", 2)
if len(split) > 1 and split[1]:
self.fm.search_file(split[1], regexp=True)
It also avoids that "list index out of range" error message, perhaps you've noticed it
Here's an alternative; it doesn't jump to the next matching file if the current file is still matching:
class inc_search(Command):
def quick(self):
import re
split = self.line.split(" ", 2)
if len(split) > 1 and split[1] and not re.match(split[1], self.fm.env.cf.basename):
self.fm.search_file(split[1], regexp=True)
Hi hut,
I switched to ranger recently. Now I'm using "ranger-git". Basically, it works fine, but after I edited a file and back to ranger, it seems get no reflect about the modified file. does ranger have the ability to track file modification?
thanks.
(edit typo)
New versions of ranger never update previews, unless you press <Ctrl-R> or (under certain conditions) resize the window.
This will be fixed at some point... perhaps now.
Edit: done
Last edited by hut (2010-12-11 21:39:25)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Thanks hut, it's working now Wouldn't this be a nice feature to add by default? I think it is one of the quickest ways to navigate through large directories.
Offline