From 95b669faeaca543eef02bd076e7c368e23a7463d Mon Sep 17 00:00:00 2001 From: defanor Date: Tue, 28 Nov 2017 13:48:06 +0300 Subject: Use [ and ] instead of b and f for history navigation Akin to info viewers, and these won't interfere with link enumeration. Also use "quit" instead of "q". --- Pancake.hs | 2 +- Pancake/Command.hs | 6 +++--- README | 2 +- pancake.el | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Pancake.hs b/Pancake.hs index 0c9db1e..550dbb3 100644 --- a/Pancake.hs +++ b/Pancake.hs @@ -288,7 +288,7 @@ command (GoTo t RCurrent) = do command Help = do st <- get putErrLn $ intercalate "\n" - [ "basic commands: [b]ack, [f]orward, ',' to reload" + [ "basic commands: [ and ] to go back or forward, ',' to reload" , " or [,] to open a document" ] when (paginate $ conf st) $ putErrLn "RET to scroll" command (Show n) = do diff --git a/Pancake/Command.hs b/Pancake/Command.hs index 028012a..c385dc2 100644 --- a/Pancake/Command.hs +++ b/Pancake/Command.hs @@ -69,9 +69,9 @@ parseCommand c = either (const Help) id . parse (command c) "user input" -- | Basic (constant) command parser. basicCommand :: Parser Command basicCommand = choice . map (\(s, c) -> try (string s <* eof) *> pure c) $ - [ ("q", Quit) - , ("b", Back) - , ("f", Forward) + [ ("quit", Quit) + , ("[", Back) + , ("]", Forward) , (",", GoTo Nothing RCurrent) , ("reload config", ReloadConfig) , ("help", Help) diff --git a/README b/README index 0c39678..6f46f6b 100644 --- a/README +++ b/README @@ -100,7 +100,7 @@ directory, and would look approximately like this:: type: %{content_type} "' - referenceDigits: 'rstwpxcvazdg' + referenceDigits: 'rstwfpxcvaqzdgb' shortcuts: g: https://m.gutenberg.org/ebooks/search.mobile/?query= ddg: https://duckduckgo.com/lite/?q= diff --git a/pancake.el b/pancake.el index 570f4e5..dacd593 100644 --- a/pancake.el +++ b/pancake.el @@ -356,17 +356,17 @@ property. Returns a list of collected values." (defun pancake-go-backward () "Go backward in history." (interactive) - (pancake-process-send "b")) + (pancake-process-send "[")) (defun pancake-go-forward () "Go forward in history." (interactive) - (pancake-process-send "f")) + (pancake-process-send "]")) (defun pancake-quit () "Quit pancake." (interactive) - (pancake-process-send "q")) + (pancake-process-send "quit")) (defun pancake-reload () "Reload the current document." @@ -452,8 +452,8 @@ it to `pancake-process' as input." (define-key map (kbd "C-c C-u") 'pancake-display-current-uri) (define-key map (kbd "C-M-e") 'pancake-next-heading) (define-key map (kbd "C-M-a") 'pancake-previous-heading) - (define-key map (kbd "B") 'pancake-go-backward) - (define-key map (kbd "F") 'pancake-go-forward) + (define-key map (kbd "[") 'pancake-go-backward) + (define-key map (kbd "]") 'pancake-go-forward) (define-key map (kbd "Q") 'pancake-quit) (define-key map (kbd "R") 'pancake-reload) (define-key map (kbd "I") 'pancake-load-images) -- cgit v1.2.3