summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/ranger.113
-rw-r--r--doc/ranger.pod13
-rw-r--r--doc/rifle.12
-rw-r--r--ranger/config/rc.conf1
-rw-r--r--ranger/container/directory.py2
-rw-r--r--ranger/container/fsobject.py5
-rw-r--r--ranger/container/settings.py1
7 files changed, 34 insertions, 3 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 045d8b95..4c8267f2 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.9.0b5" "2017-06-16" "ranger manual"
+.TH RANGER 1 "ranger-1.9.0b5" "07/16/2017" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -489,6 +489,12 @@ Move up and down in the parent directory.
 .IP "^R" 14
 .IX Item "^R"
 Reload everything
+.IP "F" 14
+.IX Item "F"
+Toggle \fIfreeze_files\fR setting.  When active, directories and files will not be
+loaded, improving performance when all the files you need are already loaded.
+This does not affect file previews, which can be toggled with \fIzI\fR.  Also try
+disabling the preview of directories with \fIzP\fR.
 .IP "^L" 14
 .IX Item "^L"
 Redraw the screen
@@ -767,6 +773,11 @@ currently running tasks which support progress bars?
 Flush the input after each key hit?  One advantage is that when scrolling down
 with \*(L"j\*(R", ranger stops scrolling instantly when you release the key.  One
 disadvantage is that when you type commands blindly, some keys might get lost.
+.IP "freeze_files [bool] <F>" 4
+.IX Item "freeze_files [bool] <F>"
+When active, directories and files will not be loaded, improving performance
+when all the files you need are already loaded.  This does not affect file
+previews.
 .IP "hidden_filter [string]" 4
 .IX Item "hidden_filter [string]"
 A regular expression pattern for files which should be hidden.  For example,
diff --git a/doc/ranger.pod b/doc/ranger.pod
index d9dd6b3d..f5e03b5a 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -401,6 +401,13 @@ Move up and down in the parent directory.
 
 Reload everything
 
+=item F
+
+Toggle I<freeze_files> setting.  When active, directories and files will not be
+loaded, improving performance when all the files you need are already loaded.
+This does not affect file previews, which can be toggled with I<zI>.  Also try
+disabling the preview of directories with I<zP>.
+
 =item ^L
 
 Redraw the screen
@@ -758,6 +765,12 @@ Flush the input after each key hit?  One advantage is that when scrolling down
 with "j", ranger stops scrolling instantly when you release the key.  One
 disadvantage is that when you type commands blindly, some keys might get lost.
 
+=item freeze_files [bool] <F>
+
+When active, directories and files will not be loaded, improving performance
+when all the files you need are already loaded.  This does not affect file
+previews.
+
 =item hidden_filter [string]
 
 A regular expression pattern for files which should be hidden.  For example,
diff --git a/doc/rifle.1 b/doc/rifle.1
index 95c9ce50..aefc3979 100644
--- a/doc/rifle.1
+++ b/doc/rifle.1
@@ -129,7 +129,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RIFLE 1"
-.TH RIFLE 1 "rifle-1.9.0b5" "2017-03-23" "rifle manual"
+.TH RIFLE 1 "rifle-1.9.0b5" "07/16/2017" "rifle manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index e088b660..92428312 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -271,6 +271,7 @@ map     q quit
 copymap q ZZ ZQ
 
 map R     reload_cwd
+map F     set freeze_files!
 map <C-r> reset
 map <C-l> redraw_window
 map <C-c> abort
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index c73e2408..97a3f0aa 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -471,6 +471,8 @@ class Directory(  # pylint: disable=too-many-instance-attributes,too-many-public
         Use this sparingly since it takes rather long.
         """
         self.content_outdated = False
+        if self.settings.freeze_files:
+            return
 
         if not self.loading:
             if not self.loaded:
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index 121fac22..640d0c48 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -270,9 +270,12 @@ class FileSystemObject(  # pylint: disable=too-many-instance-attributes,too-many
         filesystem and caches it for later use
         """
 
+        self.loaded = True
+        if self.settings.freeze_files:
+            return
+
         self.display_data = {}
         self.fm.update_preview(self.path)
-        self.loaded = True
 
         # Get the stat object, either from preload or from [l]stat
         self.permissions = None
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 243e1eb8..521583c4 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -41,6 +41,7 @@ ALLOWED_SETTINGS = {
     'draw_borders': bool,
     'draw_progress_bar_in_status_bar': bool,
     'flushinput': bool,
+    'freeze_files': bool,
     'global_inode_type_filter': str,
     'hidden_filter': str,
     'idle_delay': int,