Recently Written · git

quickurl

git clone https://github.com/equwal/quickurl

Log | Files | Refs


commit 05571932273275aa894252e7cbad9f6080fa8bb6
Spenser Truex <web@spensertruex.com>
2019-11-19 17:02:13 -0800

Initialize launch sequence.

 README.org     | 34 ++++++++++++++++++++++++++++++++
 keybindings.el | 22 +++++++++++++++++++++
 packages.el    | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 118 insertions(+)
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..11dba2c
--- /dev/null
+++ b/README.org
@@ -0,0 +1,34 @@
+#+TITLE: quickurl layer
+
+This is the stable version of the quickurl layer. [[https://github.com/syl20bnr/spacemacs/pull/12a964][You can track the pull request
+into Spacemacs]].
+* Table of Contents                                        :TOC_4_gh:noexport:
+- [[#description][Description]]
+- [[#install][Install]]
+- [[#key-bindings][Key bindings]]
+
+* Description
+This layer does wonderful things:
+- Add keybindings to dispatch Quickurl (which is in vanilla Emacs), or to
+  navigate and dispatch the Quickurl list.
+
+* Install
+To use this configuration layer, add it to your =~/.spacemacs=. You will need to
+add =quickurl= to the existing =dotspacemacs-configuration-layers= list in this
+file.
+
+* Key bindings
+| Key Binding | Description                                                 |
+|-------------+-------------------------------------------------------------|
+| ~SPC Q l~   | List quickurls                                              |
+| ~SPC Q Q~   | Expand quickurl abbrev at point                             |
+| ~SPC Q i~   | Ask for which quickurl to insert                            |
+| ~SPC Q e~   | Edit quickurls                                              |
+| ~SPC Q b~   | Ask to browse some url from those stored (with completion). |
+
+
+# Use GitHub URLs if you wish to link a Spacemacs documentation file or its heading.
+# Examples:
+# [[https://github.com/syl20bnr/spacemacs/blob/master/doc/VIMUSERS.org#sessions]]
+# [[https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bfun/emoji/README.org][Link to Emoji layer README.org]]
+# If space-doc-mode is enabled, Spacemacs will open a local copy of the linked file.
diff --git a/keybindings.el b/keybindings.el
new file mode 100644
index 0000000..2ee747b
--- /dev/null
+++ b/keybindings.el
@@ -0,0 +1,22 @@
+;; Copyright (C) 2019 Spenser Truex
+;; Author: Spenser Truex <web@spensertruex.com>
+;; Created: 2019-11-19
+;; This file is not part of GNU Emacs.
+;; This file is free software.
+;; License:
+;; Licensed with the GNU GPL v3 see:
+;; <https://www.gnu.org/licenses/>.
+;;; Commentary:
+;; Keybindings to use Quickurl, including mode-local ones for the listing.
+;;; Code:
+
+(spacemacs/declare-prefix "Q" "quickurl")
+(spacemacs/set-leader-keys
+  "Ql" 'quickurl-list
+  "QQ" 'quickurl
+  "Qi" 'quickurl-ask
+  "Qe" 'quickurl-edit-urls
+  "Qa" 'quickurl-add-url
+  "Qb" 'quickurl-browse-url-ask)
+
+;;; keybindings.el ends here
diff --git a/packages.el b/packages.el
new file mode 100644
index 0000000..75de49b
--- /dev/null
+++ b/packages.el
@@ -0,0 +1,62 @@
+;;; packages.el --- quickurl layer packages file for Spacemacs.
+;;
+;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
+;;
+;; Author: Spenser Truex <web@spensertruex.com>
+;; URL: https://github.com/syl20bnr/spacemacs
+;;
+;; This file is not part of GNU Emacs.
+;;
+;;; License: GPLv3
+
+;;; Commentary:
+
+;; See the Spacemacs documentation and FAQs for instructions on how to implement
+;; a new layer:
+;;
+;;   SPC h SPC layers RET
+;;
+;;
+;; Briefly, each package to be installed or configured by this layer should be
+;; added to `quickurl-packages'. Then, for each package PACKAGE:
+;;
+;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
+;;   function `quickurl/init-PACKAGE' to load and initialize the package.
+
+;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
+;;   define the functions `quickurl/pre-init-PACKAGE' and/or
+;;   `quickurl/post-init-PACKAGE' to customize the package as it is loaded.
+
+;;; Code:
+
+(defconst quickurl-packages
+  '()
+  "The list of Lisp packages required by the quickurl layer.
+
+Each entry is either:
+
+1. A symbol, which is interpreted as a package to be installed, or
+
+2. A list of the form (PACKAGE KEYS...), where PACKAGE is the
+    name of the package to be installed or loaded, and KEYS are
+    any number of keyword-value-pairs.
+
+    The following keys are accepted:
+
+    - :excluded (t or nil): Prevent the package from being loaded
+      if value is non-nil
+
+    - :location: Specify a custom installation location.
+      The following values are legal:
+
+      - The symbol `elpa' (default) means PACKAGE will be
+        installed using the Emacs package manager.
+
+      - The symbol `local' directs Spacemacs to load the file at
+        `./local/PACKAGE/PACKAGE.el'
+
+      - A list beginning with the symbol `recipe' is a melpa
+        recipe.  See: https://github.com/milkypostman/melpa#recipe-format")
+
+
+;;; packages.el ends here