about summary refs log tree commit diff stats
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
[next]
Commit message (Expand)AuthorAgeFilesLines
...
* implemented exact focus next, if arg != NULL to focus{next,prev}Anselm R Garbe2008-05-114-17/+27
* applied the proposal by nszAnselm R Garbe2008-05-061-3/+5
* applied JUCE patchAnselm R Garbe2008-05-062-0/+3
* simplification of view() as proposed by anydotAnselm R Garbe2008-04-271-10/+3
* applied yiyus tagset patchAnselm R Garbe2008-04-271-21/+16
* applied yiyus fgeom patchAnselm R Garbe2008-04-272-35/+41
* applied dfenze drawtext simplificationsAnselm R Garbe2008-04-271-8/+7
* this is the correct wayanselm@anselm12008-04-201-0/+1
* copyright notice is in LICENSEanselm@anselm12008-04-201-1/+0
* applied Ph's seltags-simplification with some modificationsanselm@anselm12008-04-201-13/+10
* applied Ph's MIN/MAX patch, nice work!anselm@anselm12008-04-201-31/+22
* applied Ph's patch regarding geom and lt initializationanselm@anselm12008-04-201-8/+4
* applied Gottox' applyrules() fixanselm@anselm12008-04-201-2/+2
* geometry fix proposed by JukkaAnselm R Garbe2008-04-081-1/+1
* applied applyrules-fix by Jukka, thank you Jukka!Anselm R Garbe2008-04-071-3/+3
* fixAnselm R Garbe2008-04-051-1/+1
* applied the proposed monocle patch from the mailinglistAnselm R Garbe2008-04-051-1/+1
* next version is 5.0Anselm R Garbe2008-04-041-1/+1
* Added tag 4.9 for changeset 22c669b2dd36anselm@anselm12008-04-031-0/+1
* yet another cleanup 4.9Anselm R Garbe2008-04-031-2/+2
* some cleanup changesAnselm R Garbe2008-04-032-3/+1
* uncommented dual layout in preparation of dwm 4.9anselm@anselm12008-04-021-2/+2
* applied Peter Hartlich's simplification patch of setmfact and his revival of ...anselm@anselm12008-04-022-42/+24
* aspects hints seem broken for fullscreen appsAnselm R Garbe2008-04-011-3/+5
* removed uneccessary lineAnselm R Garbe2008-03-311-1/+0
* bugfixAnselm R Garbe2008-03-251-1/+1
* setmfact should not have any effect if in floating layoutAnselm R Garbe2008-03-241-1/+1
* minor fixAnselm R Garbe2008-03-241-1/+1
* revival of mfact and setmfactAnselm R Garbe2008-03-243-1/+31