summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-28 13:48:06 +0300
committerdefanor <defanor@uberspace.net>2017-11-28 13:48:06 +0300
commit95b669faeaca543eef02bd076e7c368e23a7463d (patch)
tree14a78bef631b6cca202375edded44e8bccbf1a72
parent151e3d381b3beedacff475f439c6340a656bc8c3 (diff)
downloadpancake-95b669faeaca543eef02bd076e7c368e23a7463d.zip
pancake-95b669faeaca543eef02bd076e7c368e23a7463d.tar.gz
pancake-95b669faeaca543eef02bd076e7c368e23a7463d.tar.bz2
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.hs2
-rw-r--r--Pancake/Command.hs6
-rw-r--r--README2
-rw-r--r--pancake.el10
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"
, "<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)
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)