diff options
author | defanor <defanor@uberspace.net> | 2017-11-28 13:48:06 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-28 13:48:06 +0300 |
commit | 95b669faeaca543eef02bd076e7c368e23a7463d (patch) | |
tree | 14a78bef631b6cca202375edded44e8bccbf1a72 | |
parent | 151e3d381b3beedacff475f439c6340a656bc8c3 (diff) |
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".
-rw-r--r-- | Pancake.hs | 2 | ||||
-rw-r--r-- | Pancake/Command.hs | 6 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | pancake.el | 10 |
4 files changed, 10 insertions, 10 deletions
@@ -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" , "<URI> or [,]<number> 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) @@ -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= @@ -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) |