summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/keys.py8
-rw-r--r--ranger/help/movement.py8
2 files changed, 9 insertions, 7 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index 3846850e..029ffdeb 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -72,8 +72,8 @@ def initialize_commands(command_list):
 	bind('%', fm.move_pointer_by_percentage(absolute=50))
 	bind(KEY_NPAGE, fm.move_pointer_by_pages(1))
 	bind(KEY_PPAGE, fm.move_pointer_by_pages(-1))
-	bind('J', ctrl('d'), fm.move_pointer_by_pages(0.5))
-	bind('K', ctrl('u'), fm.move_pointer_by_pages(-0.5))
+	bind(ctrl('d'), fm.move_pointer_by_pages(0.5))
+	bind(ctrl('u'), fm.move_pointer_by_pages(-0.5))
 
 	# --------------------------------------------------------- history
 	bind('H', fm.history_go(-1))
@@ -272,8 +272,8 @@ def _base_pager_commands(command_list):
 	bind(KEY_RIGHT, wdg.move_horizontal(relative=4))
 	bind(KEY_NPAGE, wdg.move(relative=1, pages=True))
 	bind(KEY_PPAGE, wdg.move(relative=-1, pages=True))
-	bind('J', ctrl('d'), wdg.move(relative=0.5, pages=True))
-	bind('K', ctrl('u'), wdg.move(relative=-0.5, pages=True))
+	bind(ctrl('d'), wdg.move(relative=0.5, pages=True))
+	bind(ctrl('u'), wdg.move(relative=-0.5, pages=True))
 
 	# ---------------------------------------------------------- others
 	bind('E', fm.edit_file())
diff --git a/ranger/help/movement.py b/ranger/help/movement.py
index 96461652..e5fb8a5e 100644
--- a/ranger/help/movement.py
+++ b/ranger/help/movement.py
@@ -25,13 +25,15 @@
 ==============================================================================
 1.1. Ranger has similar movement keys as vim:
 
+Note: A ^ stands for the Ctrl key.
+
 	k	move up
 	j	move down
 	h	move left (in browser: move one directory up)
 	l	move right (in browser: enter this directory, or run this file)
 
-	K	move half the screen up
-	J	move half the screen down
+	^U	move half the screen up
+	^D	move half the screen down
 	H	in browser: move back in history
 	L	in browser: move forward in history
 
@@ -41,7 +43,7 @@
 
 By prefixing a number, you can give more precise commands, eg:
 
-	2J	move 2 pages down
+	2^D	move 2 pages down
 	5gg	move to the 5th line
 	3h	move 3 characters to the left, or move 3 directories up
 	30%	move to 30% of the screen
t */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
Guidelines on Code Modification
===============================

Coding Style
------------

* Use syntax compatible to both python 2.6 and 3.1.
* Use docstrings with pydoc in mind
* Follow the style guide for python code:
    http://www.python.org/dev/peps/pep-0008/
* Although this guide suggests otherwise, tabs are used for indentation
    of code and docstrings.  In other documents (readme, etc), use spaces.


Patches
-------

Send patches, created with "git format-patch", to the email adress

    romanz@lavabit.com

If you plan to do major changes, or many changes over time, I encourage
you to create a fork on GitHub, Gitorious or any other site.


Common Changes
--------------

* Change which files are previewed in the auto preview:
In ranger/gui/widget/browsercolumn.py
the constant PREVIEW_BLACKLIST

* Adding options:
In ranger/defaults/options.py
add the default value, like: my_option = True
In ranger/shared/settings.py
add the name of your option to the constant ALLOWED_SETTINGS

The setting is now accessible at self.settings.my_option,
assuming <self> is a "SettingsAware" object.

* Change commands:
ranger/defaults/commands.py

* Create aliases for commands:
In ranger/defaults/commands.py
at the bottom, write something like: alias(exit=quit)

* Adding colorschemes:
Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
and modify it according to your needs.  Alternatively, mimic the jungle
colorscheme.  It subclasses the default scheme and just modifies a few things.
In ranger/defaults/options.py (or ~/.ranger/options.py), change
    colorscheme = colorschemes.default
to: colorscheme = colorschemes.myscheme

* Change which files are considered to be "hidden":
In ranger/defaults/options.py
change the hidden_filter regular expression.

* Change the key map:
Modify ranger/defaults/keys.py.  This should be self-explanatory.
Check out ranger/core/actions.py for the most common actions, of course
you can also use your own functions.

* Change the file type => application associations:
In ranger/defaults/apps.py
modify the method app_default.
The variable "f" is a filesystem-object with attributes like mimetype,
extension, etc.  For a full list, check ranger/fsobject/fsobject.py

* Change the file extension => mime type associations:
Modify ranger/data/mime.types
and run ranger/data/generate.py to compile it.


Version Numbering
-----------------

X.Y.Z, where:

* X: Milestones
* Y: Stable versions
* Z: Experimental versions