summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_chmod_keybindings.py2
-rw-r--r--examples/plugin_hello_world.py10
-rw-r--r--examples/plugin_skip_default_rc.py9
3 files changed, 6 insertions, 15 deletions
diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py
index 9c9a0982..f26cb3e3 100644
--- a/examples/plugin_chmod_keybindings.py
+++ b/examples/plugin_chmod_keybindings.py
@@ -10,7 +10,7 @@ def hook_init(fm):
 
     # Generate key bindings for the chmod command
     command = "map {0}{1}{2} shell -d chmod {1}{0}{2} %s"
-    for mode in list('ugoa') + '':
+    for mode in list('ugoa') + ['']:
         for perm in "rwxXst":
             fm.execute_console(command.format('-', mode, perm))
             fm.execute_console(command.format('+', mode, perm))
diff --git a/examples/plugin_hello_world.py b/examples/plugin_hello_world.py
index 187f428e..e43eb61d 100644
--- a/examples/plugin_hello_world.py
+++ b/examples/plugin_hello_world.py
@@ -11,11 +11,11 @@ old_hook_ready = ranger.api.hook_ready
 
 # Create a replacement for the hook that...
 def hook_ready(fm):
-  # ...does the desired action...
-  fm.notify("Hello World")
-  # ...and calls the saved hook.  If you don't care about the return value, simply
-  # return the return value of the previous hook to be on the safe side.
-  return old_hook_ready(fm)
+    # ...does the desired action...
+    fm.notify("Hello World")
+    # ...and calls the saved hook.  If you don't care about the return value,
+    # simply return the return value of the previous hook to be safe.
+    return old_hook_ready(fm)
 
 # Finally, "monkey patch" the existing hook_ready function with our replacement:
 ranger.api.hook_ready = hook_ready
diff --git a/examples/plugin_skip_default_rc.py b/examples/plugin_skip_default_rc.py
deleted file mode 100644
index 6a657a99..00000000
--- a/examples/plugin_skip_default_rc.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# This plugin inhibits the loading of the default rc.conf.  This serves to
-# speed up starting time by avoiding to load rc.conf twice if you have a full
-# copy of it in ~/.config/ranger.
-#
-# Don't use this if you have a supplementary rc.conf or no rc.conf at all, or
-# you will end up without key bindings and options.
-
-import ranger.core.main
-ranger.core.main.load_default_config = False