about summary refs log tree commit diff stats
path: root/code
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 18:10:40 +0200
committerhut <hut@lavabit.com>2009-07-20 21:11:16 +0200
commit079e301a629e076626361b0efb81839bc338737b (patch)
treeafc9bf4392d7580cc610b8d8b34b70bc5ab46891 /code
parent1c5184528eb436e0775a59cdcd6aa64744f36c9a (diff)
downloadranger-079e301a629e076626361b0efb81839bc338737b.tar.gz
[ea] and [et] edit configuration files
Diffstat (limited to 'code')
-rw-r--r--code/draw.rb2
-rw-r--r--code/help.rb1
-rw-r--r--code/keys.rb10
3 files changed, 12 insertions, 1 deletions
diff --git a/code/draw.rb b/code/draw.rb
index f8af1574..3144316a 100644
--- a/code/draw.rb
+++ b/code/draw.rb
@@ -292,6 +292,8 @@ module Fm
 				puti btm, "Sort by (n)ame (s)ize (m)time (c)time (e)xtension mime(t)ype (CAPITAL:reversed)"
 			when 't'
 				puti btm, "Toggle (h)idden_files (d)irs_first (f)ilepreview (p)review (w)idebar (c)d (!)confirm"
+			when 'e'
+				puti btm, "Edit (a)pplications file(t)ypes"
 			else
 				owner = "#{Etc.getpwuid(cf.stat.uid).name}:#{Etc.getgrgid(cf.stat.gid).name}"
 				attr_set(Color.base)
diff --git a/code/help.rb b/code/help.rb
index eeb43c12..c386f8c5 100644
--- a/code/help.rb
+++ b/code/help.rb
@@ -219,6 +219,7 @@ module Fm
 
 	key:o
 	t<x>         Toggle Option
+	e<x>         Edit configuration files
 	S<x>         Change Sorting. capital letter <x> for reversed sorting
 	E            Edit file
 	s            Enter Shell
diff --git a/code/keys.rb b/code/keys.rb
index 504e7691..4d3cbbaa 100644
--- a/code/keys.rb
+++ b/code/keys.rb
@@ -437,6 +437,14 @@ module Fm
 			update_pointers
 #			@pwd.schedule
 
+		when 'ea'
+			edit File.join( MYDIR, 'data', 'apps.rb' )
+			reload_types
+
+		when 'et'
+			edit File.join( MYDIR, 'data', 'types.rb' )
+			reload_types
+
 		when 't!'
 			Option.confirm ^= true
 
@@ -538,7 +546,7 @@ module Fm
 
 		@@key_combinations = %w[
 			g y c Z cu
-			ter ta S
+			ter ta S e
 			?? ?g ?f ?m ?l ?c ?o ?z ?s
 			o m ` ' go