This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+misc/copy-as-format/README.org

62 lines
1.9 KiB
Org Mode
Raw Normal View History

2018-06-15 20:50:29 +00:00
#+TITLE: copy-as-format layer
2019-05-02 21:49:30 +00:00
#+TAGS: layer|misc
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2018-06-15 20:50:29 +00:00
- [[#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.
2018-07-26 22:20:09 +00:00
2018-06-15 20:50:29 +00:00
#+BEGIN_SRC elisp
2018-09-19 03:54:47 +00:00
(setq copy-as-format-default "markdown")
2018-06-15 20:50:29 +00:00
#+END_SRC
Also, you can enable copying of buffer's file name for asciidoc formatter.
2018-07-26 22:20:09 +00:00
2018-06-15 20:50:29 +00:00
#+BEGIN_SRC elisp
2018-09-19 03:54:47 +00:00
(setq copy-as-format-asciidoc-include-file-name t)
2018-06-15 20:50:29 +00:00
#+END_SRC
And you can add alist of file name patterns to language names used for asciidoc syntax highlighting.
2018-07-26 22:20:09 +00:00
2018-06-15 20:50:29 +00:00
#+BEGIN_SRC elisp
2018-09-19 03:54:47 +00:00
(setq copy-as-format-asciidoc-language-alist '(("^.*\\.java$" "java")
("^.*\\.clj[cs]?$" "clojure")))
2018-06-15 20:50:29 +00:00
#+END_SRC
* Key bindings
| Key binding | Description |
2018-06-15 20:50:29 +00:00
|-------------+--------------------------|
| ~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 |