spacemacs/layers/+misc/copy-as-format/README.org
2018-10-11 00:13:43 +03:00

60 lines
1.9 KiB
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+TITLE: copy-as-format layer
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#configuration][Configuration]]
- [[#key-bindings][Key bindings]]
* Description
This layer adds support for [[https://github.com/sshaw/copy-as-format][copy-as-format]].
** Features:
- Function to copy buffer locations as GitHub/Slack/JIRA/HipChat/... formatted code
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =copy-as-format= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Configuration
You can choose default formatter.
#+BEGIN_SRC elisp
(setq copy-as-format-default "markdown")
#+END_SRC
Also, you can enable copying of buffers file name for asciidoc formatter.
#+BEGIN_SRC elisp
(setq copy-as-format-asciidoc-include-file-name t)
#+END_SRC
And you can add alist of file name patterns to language names used for asciidoc syntax highlighting.
#+BEGIN_SRC elisp
(setq copy-as-format-asciidoc-language-alist '(("^.*\\.java$" "java")
("^.*\\.clj[cs]?$" "clojure")))
#+END_SRC
* Key bindings
| Key Binding | Description |
|-------------+--------------------------|
| ~SPC x f f~ | copy-as-format |
| ~SPC x f a~ | copy-as-format-asciidoc |
| ~SPC x f b~ | copy-as-format-bitbucket |
| ~SPC x f d~ | copy-as-format-disqus |
| ~SPC x f g~ | copy-as-format-github |
| ~SPC x f l~ | copy-as-format-gitlab |
| ~SPC x f c~ | copy-as-format-hipchat |
| ~SPC x f h~ | copy-as-format-html |
| ~SPC x f j~ | copy-as-format-jira |
| ~SPC x f m~ | copy-as-format-markdown |
| ~SPC x f w~ | copy-as-format-mediawiki |
| ~SPC x f o~ | copy-as-format-org-mode |
| ~SPC x f p~ | copy-as-format-pod |
| ~SPC x f r~ | copy-as-format-rst |
| ~SPC x f s~ | copy-as-format-slack |