about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger.conf50
-rwxr-xr-xranger.rb5
2 files changed, 45 insertions, 10 deletions
diff --git a/ranger.conf b/ranger.conf
index 45bf654d..b6aeaffd 100644
--- a/ranger.conf
+++ b/ranger.conf
@@ -1,9 +1,45 @@
-Option.show_hidden  = false
-Option.sort         = :name
-Option.sort_reverse = false
-Option.colorscheme  = 'default'
-Option.wide_bar     = true
-Option.file_preview = true
-Option.preview      = true
+# ranger configuration file
 
+##--------------------------------------------------
+# options are in this format: Option.<name> = <value>
+# if an option is not defined, the default value is used.
+# this file is treated as ruby code, text after # is ignored
+ 
+##--------------------------------------------------
+# should all non-ascii characters be replaced with stars?
+# use this if unicode is not supported by your OS/ruby/ncurses version
+Option.ascii_only     = true
+
+# how to sort? don't forget the column before the word.
+# :name   |  sort by name
+# :ext    |  sort by file extension
+# :type   |  sort by MIME type
+# :size   |  sort by file size
+# :ctime  |  sort by change time (of the filesystem inode)
+# :mtime  |  sort by modification time (of the content)
+Option.sort           = :name
+
+# display a wide bar in the current column?
+Option.wide_bar       = true
+
+# which colorscheme to use? colorschemes are in data/colorscheme/
+# by default, there are 'default' and 'mono'
+Option.colorscheme    = 'default'
+
+# ask for a confirmation before deleting things?
+Option.confirm_string = "yes I am!"
+Option.confirm        = true
+
+# these options are obvious
+Option.bookmark_file  = '~/.ranger_bookmarks'
+Option.show_hidden    = false
 Option.list_dir_first = true
+Option.sort_reverse   = false
+Option.mouse          = true
+Option.preview        = true
+Option.file_preview   = true
+
+##--------------------------------------------------
+# just ignore this:
+# ^\s:\(.*\)\s\{8}=>\(.*\),\?$/Option.\1=\2
+# vim: ft=ruby
diff --git a/ranger.rb b/ranger.rb
index fc74e012..441a3a82 100755
--- a/ranger.rb
+++ b/ranger.rb
@@ -37,8 +37,6 @@ opt = {
 	:sort                   => :name,
 	:list_dir_first         => true,
 	:sort_reverse           => false,
-	:cd                     => ARGV.include?('--cd'),
-	:colorscheme            => true,
 	:bookmark_file          => '~/.ranger_bookmarks',
 	:ascii_only             => true,
 	:wide_bar               => true,
@@ -47,7 +45,8 @@ opt = {
 	:file_preview           => true,
 	:preview                => true,
 	:mouse                  => true,
-	:colorscheme            => 'default'
+	:colorscheme            => 'default',
+	:cd                     => ARGV.include?('--cd'),
 }
 
 class OptionClass < Struct.new(*opt.keys)