From 24b8851bf5563550cc61ef7eb1707449312fedd0 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 21 Jul 2009 04:28:37 +0200 Subject: made [r..r] more consistent with other commands it's now r.. additionally, you can write a colon and an application name at the end, to start the files with a specific application. --- code/keys.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'code/keys.rb') diff --git a/code/keys.rb b/code/keys.rb index eb4f086a..7b675c3a 100644 --- a/code/keys.rb +++ b/code/keys.rb @@ -369,9 +369,17 @@ module Fm Action.run(RunContext.new(getfiles, nil, nil, 'editor')) end - when /^[ri](\d*)(?i:([adetw]*))[ri]$/ - run_context = RunContext.new(getfiles, $1, $2) - Action.run(run_context) + when /^r\s?(.*)$/ + if_enter_pressed($1) do |arg| + @buffer.clear + + info, app = arg.split(":", 2) + info =~ /(\d*)([adetw]*)/i + mode, flags = $1, $2 + + run_context = RunContext.new(getfiles, mode, flags, app) + Action.run(run_context) + end when "-", "=" val = "2#{key=='-' ? '-' : '+'}" @@ -599,8 +607,7 @@ module Fm /:[^<]*/ /[fF/!].*/ - /r\d*\w*[^r]/ - /(cw|cm|co|cd|mv|gf).*/ + /(r|cw|cm|co|cd|mv|gf).*/ /b(l(o(c(k(.*)?)?)?)?)?/ /g(r(e(p(.*)?)?)?)?/ /m(k(d(i(r(.*)?)?)?)?)?/ -- cgit 1.4.1-2-gfad0