summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-12-10 23:37:15 +0100
committerhut <hut@lepus.uberspace.de>2014-12-10 23:37:50 +0100
commit6deb64e69643612022e11772573cac23aabb4983 (patch)
tree3fcaa7be2e14e5e87118c5857b6528f74e093d99
parentaa5459503e4f1944e9ac5987592bb8c53285efa8 (diff)
downloadranger-6deb64e69643612022e11772573cac23aabb4983.tar.gz
use markdown in HACKING.md, update it, fix typos
-rw-r--r--HACKING.md74
1 files changed, 46 insertions, 28 deletions
diff --git a/HACKING.md b/HACKING.md
index 68a1a942..79f59b3f 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -1,5 +1,5 @@
-Guidelines on Code Modification
-===============================
+Guidelines for Code Modification
+================================
 
 Coding Style
 ------------
@@ -14,12 +14,20 @@ Coding Style
 Patches
 -------
 
-Send patches, created with "git format-patch", to the email adress
+Send patches, created with "git format-patch", to the email address
 
-    hut@lepus.uberspace.de
+    hut@hut.pm
 
-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.
+or open a pull request on GitHub.
+
+
+Version Numbering
+-----------------
+
+Three numbers, A.B.C, with
+* A changes on a rewrite
+* B changes when major configuration incompatibilities occur
+* C changes with each release
 
 
 Starting Points
@@ -36,39 +44,49 @@ ranger/gui/ui.py
 
 
 Common Changes
+==============
+
+Adding options
 --------------
 
-* Change which files are previewed in the auto preview:
-In ranger/container/file.py
-the constant PREVIEW_BLACKLIST
+* Add a default value in rc.conf, along with a comment that describes the option.
+* Add the option to the ALLOWED_SETTINGS dictionary in the file
+  ranger/container/settings.py.  Make sure to sort in the new entry
+  alphabetically.
+* Add an entry in the man page by editing doc/ranger.pod, then rebuild the man
+  page by running "make man" in the ranger root directory
+
+The setting is now accessible with self.settings.my_option, assuming self is a
+subclass of ranger.core.shared.SettingsAware.
 
-* Adding options:
-In ranger/config/rc.conf
-add the default value, like: my_option = True
-In ranger/container/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.
+Adding colorschemes
+-------------------
 
-* 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/config/rc.conf (or ~/.config/ranger/rc.conf), add the line:
+* Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
+  and modify it according to your needs.  Alternatively, create a subclass of
+  ranger.colorschemes.default.Default and override the "use" method, as it is
+  done in the "Jungle" colorscheme.
+
+* Add this line to your ~/.config/ranger/rc.conf:
 
     set colorscheme myscheme
 
-* Change the file type => application associations:
+
+Change the file type => application associations
+------------------------------------------------
+
 Edit the configuration file ~/.config/ranger/rifle.conf.  The default one can
 be obtained by running "ranger --copy-config rifle".
 
-* Change the file extension => mime type associations:
-Modify ranger/data/mime.types
 
+Change the file extension => mime type associations
+---------------------------------------------------
 
-Version Numbering
------------------
+Modify ranger/data/mime.types.  You may also add your own entries to ~/.mime.types
+
+
+Change which files are previewed in the auto preview
+----------------------------------------------------
 
-Three numbers;  The first changes on a rewrite, the second changes when major
-configuration incompatibilities occur and the third changes with each release.
+In ranger/container/file.py, change the constant PREVIEW_BLACKLIST
90 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938