#+TITLE: copy-as-format layer #+TAGS: layer|misc * Table of Contents :TOC_5_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 buffer's 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 |