Reformat docs

This commit is contained in:
JAremko 2018-07-10 13:57:25 +03:00
parent 4644a28868
commit 6946e255e6
34 changed files with 88 additions and 0 deletions

View File

@ -100,6 +100,7 @@ need to install the following packages:
Install MSYS2 x86_64 from [[http://repo.msys2.org/distrib/x86_64/][here]].
Run msys2_shell.bat and in the msys2 prompt run:
#+BEGIN_SRC shell
pacman -S base-devel mingw-w64-x86_64-toolchain \
mingw-w64-x86_64-xpm-nox mingw-w64-x86_64-libtiff \

View File

@ -431,6 +431,7 @@ You can install such packages by adding them to the variable
=dotspacemacs-additional-packages= under the =dotspacemacs/layers= function in your dotfile.
For example, to install =llvm-mode= and =dts-mode=:
#+BEGIN_SRC emacs-lisp
(defun dotspacemacs/layers ()
"Configuration Layers declaration..."

View File

@ -323,6 +323,7 @@ useless. The variable =spacemacs-useful-buffers-regexp= marks buffers matching
the regexp as useful buffers. Both can be customized the same way.
Examples:
#+BEGIN_SRC emacs-lisp
;; Only mark helm buffers as useless
(setq spacemacs-useless-buffers-regexp '("\\*helm\.\+\\*"))
@ -544,6 +545,7 @@ arguments of the =ag= program.
** Modify spacemacs documentation look (space-doc-mode)
You can modify the list of visual enhancements applied by the =space-doc-mode=:
#+BEGIN_SRC emacs-lisp
(setq spacemacs-space-doc-modificators
'(center-buffer-mode
@ -557,6 +559,7 @@ You can modify the list of visual enhancements applied by the =space-doc-mode=:
org-kbd-face-remap
resize-inline-images))
#+END_SRC
By default only =center-buffer-mode= is disabled.
Both =space-doc-mode= and =center-buffer-mode= can be customized
with "Easy Customization Interface".
@ -566,6 +569,7 @@ In vim and evil, pasting over a text would cause it to be copied, hence making i
the same text multiple times.
To fix this, add the following snippet to your ~user-config~:
#+BEGIN_SRC emacs-lisp
(defun evil-paste-after-from-0 ()
(interactive)

View File

@ -189,6 +189,7 @@ backends to provide mode-specific completion. These modes will include
completion backends specified in the `spacemacs-default-company-backends`
variable. The defaults should work well, but you can configure this variable in
your =.spacemacs= file with (e.g.)
#+BEGIN_SRC emacs-lisp
(setq-default
dotspacemacs-configuration-layers

View File

@ -65,6 +65,7 @@ the same machine.
** MacOS
Get [[https://www.xquartz.org][XQuartz]] and =open -a XQuartz= In the XQuartz preferences go to the "Security"
tab and make sure youve got "Allow connections from network clients" ticked
#+BEGIN_SRC sh
ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost + $ip
@ -74,11 +75,13 @@ tab and make sure youve got "Allow connections from network clients" ticked
-v <path_to_your_workspace>:/mnt/workspace \
spacemacs/emacs25:develop
#+END_SRC
[[https://fredrikaverpil.github.io/2016/07/31/docker-for-mac-and-gui-applications][source]],
[[https://github.com/chanezon/docker-tips/blob/master/x11/README.md][another method]]
** Windows
Get [[https://www.cygwin.com][Cygwin]] with =xinit=, =xorg-server= and optionaly [[https://github.com/rprichard/winpty][winpty]](to run Emacs container with =-t=)
#+BEGIN_SRC sh
export DISPLAY=<your-machine-ip>:0.0
startxwin -- -listen tcp &
@ -92,17 +95,20 @@ Get [[https://www.cygwin.com][Cygwin]] with =xinit=, =xorg-server= and optionaly
#+END_SRC
Or with =-ti= via =winpty=
#+BEGIN_SRC sh
winpty docker run -ti --name spacemacs \
-e DISPLAY="$DISPLAY" \
-v <path_to_your_workspace>:/mnt/workspace \
spacemacs/emacs25:develop
#+END_SRC
[[http://manomarks.github.io/2015/12/03/docker-gui-windows.html][source]]
Also You can use [[https://www.reddit.com/r/emacs/comments/7a63r4/emacs_in_win10linuxdockerxserver_combo/][@ninrod 's setup]]
** GNU/Linux
Make sure that =$DISPLAY= variable is set
#+BEGIN_SRC sh
docker run -ti --name spacemacs \
-e DISPLAY="unix$DISPLAY" \
@ -116,17 +122,22 @@ Make sure that =$DISPLAY= variable is set
-v <path_to_your_workspace>:/mnt/workspace \
spacemacs/emacs25:develop
#+END_SRC
=UID= and preferably =UNAME= should match the host's user id. You can set them
in your Dockerfile with [[https://docs.docker.com/engine/reference/builder/#env][ENV statements]].
That's it! Now you should see Emacs window.
But if it doesn't work You may need to allow local connection for the user
#+BEGIN_SRC sh
xhost +si:localuser:<UNAME>
#+END_SRC
Or allow local connection from the container's host-name
#+BEGIN_SRC sh
xhost +local:`docker inspect --format='{{ .Config.Hostname }}' spacemacs`
#+END_SRC
[[http://stackoverflow.com/questions/25281992/alternatives-to-ssh-x11-forwarding-for-docker-containers][source]]
** With Xpra on any of the OSes and via web-browser
@ -145,6 +156,7 @@ here is a short instruction:
**** With Xpra desktop client
Get [[https://xpra.org/][Xpra]] client for your OS. then
#+BEGIN_SRC sh
docker run -ti --rm --name x11-bridge \
-e MODE="ssh" \
@ -159,7 +171,9 @@ Get [[https://xpra.org/][Xpra]] client for your OS. then
-e TZ=<your_time_zone> \
spacemacs/emacs25:develop
#+END_SRC
Now you can connect to it with Xpra desktop client
#+BEGIN_SRC sh
<XPRA EXECUTABLE> attach --encoding=rgb \
--ssh="ssh -o StrictHostKeyChecking=no -p 22" \
@ -181,6 +195,7 @@ Now you can connect to it with Xpra desktop client
-e DISPLAY=:14 \
spacemacs/emacs25:develop
#+END_SRC
Now visit http://localhost:10000/index.html?encoding=png&password=<PASSWORD>
* Some basic docker commands to get you going

View File

@ -33,6 +33,7 @@ only if the variable =go-use-gometalinter= is =t=.
Set =<LAYER_NAME>-spacemacs-docker-disable-deps-install= to =t=
if you want to disable dependency installation for the =<LAYER_NAME>= layer.
Example:
#+BEGIN_SRC emacs-lisp
(pandoc :variables pandoc-spacemacs-docker-disable-deps-install t)
#+END_SRC

View File

@ -198,6 +198,7 @@ or defined along side the layer itself.
For example:
#+Caption: Configure org-journal with the layer
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers '(
(org :variables

View File

@ -65,6 +65,7 @@ Configure =~/.mailrc= with the path where =msmtp= is found.
For example:
#+srcname: contents of ~/.mailrc
#+BEGIN_SRC rc
set sendmail="/usr/local/bin/msmtp"
#+END_SRC

View File

@ -1,4 +1,5 @@
#+TITLE: emberjs layer
#+CAPTION: logo
[[file:img/ember.png]]

View File

@ -34,6 +34,7 @@ React layer uses the same backend defined in javascript layer. Options are =tern
To use the on-the-fly syntax checking, install =eslint= with babel and react
support:
#+BEGIN_SRC sh
$ npm install -g eslint babel-eslint eslint-plugin-react
#+END_SRC
@ -44,18 +45,21 @@ try out this one by Airbnb:
In order to use automatic code formatting you need to install ~js-beautify~
with:
#+BEGIN_SRC sh
$ npm install -g js-beautify
#+END_SRC
If you install these in non-standard locations, then add the following to your
=dotspacemacs/user-init= function:
#+BEGIN_SRC elisp
(add-to-list 'exec-path "/path/to/node/bins" t)
#+END_SRC
Be sure to have the ~e4x~ option set to ~true~ on your ~.jsbeautifyrc~ here it
is my configuration as an example:
#+BEGIN_SRC json
{
"indent_size": 2,
@ -103,6 +107,7 @@ may use these settings:
And if you want to have 2 space indent also for element's attributes,
concatenations and contiguous function calls:
#+begin_src emacs-lisp
(with-eval-after-load 'web-mode
(add-to-list 'web-mode-indentation-params '("lineup-args" . nil))

View File

@ -42,6 +42,7 @@ file.
*** Configure the Default Input Method(配置默认中文输入法)
The default Chinese input method is =Chinese-pyim=, if you are a Wubi(五笔) user,
you could set the variable =chinese-default-input-method= to =wubi=:
#+begin_src emacs-lisp
(setq-default dotspacemacs-configuration-layers '(
(chinese :variables chinese-default-input-method 'wubi)))
@ -59,6 +60,7 @@ just press =s= to save and =R= to restart configuration.
(setq-default dotspacemacs-configuration-layers '((chinese :variables
chinese-enable-fcitx t)))
#+END_SRC
If you dont need to type Chinese in minibuffer, you can temporarily disable fcitx in the minibuffer
with the following configuration.
@ -109,6 +111,7 @@ to the Latin font size. You could call =spacemacs//set-monospaced-font= with
your own Chinese font name in =dotspacemacs/user-config= function.
Example configuration:
#+BEGIN_SRC emacs-lisp
;; Note: The Hiragino Sans GB is bundled with MacOS X.
;; If you are not using MacOS X, you should change it to another Chinese font name.

View File

@ -1,4 +1,5 @@
#+TITLE: Japanese layer
[[file:img/Japanese.png]]
* Table of Contents :TOC_4_gh:noexport:
@ -64,10 +65,12 @@ inside ~dotspacemacs/user-config~.
*** helm-with-migemo
If you want to use helm with migemo, you should add:
#+BEGIN_SRC emacs-lisp
(with-eval-after-load "helm"
(helm-migemo-mode 1))
#+END_SRC
inside ~dotspacemacs/user-config~. Note that you may find in a package called
~helm-migemo.el~ in MELPA. However, this package is deprecated and not supported
by helm.

View File

@ -69,6 +69,7 @@ configuration by yourself*. =<NAME>= is the name of the configuration you want
to customize, they are listed under the [[#configuration][Configuration]] section.
Example:
#+begin_src emacs-lisp
(defun kl/post-config-company ()
"Company delete backward."

View File

@ -70,6 +70,7 @@ To enable this feature, add the following snippet to the
#+END_SRC
Or set this variable when loading the configuration layer:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((clojure :variables clojure-enable-fancify-symbols t)))

View File

@ -66,9 +66,11 @@ Official installers for these operating systems are available from:
*** Universal installer using npm
A npm based installer is available to, and provides pre-compiled binaries for
certain operating system and architectures.
#+BEGIN_SRC sh
npm install --global elm
#+END_SRC
Also, note that you might need to set the =ELM_HOME= environment variables to
the corresponding directory created by the installer.

View File

@ -1,4 +1,5 @@
#+TITLE: Factor Layer
[[file:img/logo.png]]
* Table of Contents :TOC_4_gh:noexport:

View File

@ -128,6 +128,7 @@ closed by pressing ~C-g~ from any other window. The variable
=go-test-buffer-name= can be customized to set the output buffer name.
To provide additional arguments to go test, specify =go-use-test-args=.
#+begin_src emacs-lisp
(go :variables go-use-test-args "-race -timeout 10s"
#+end_src

View File

@ -49,12 +49,14 @@ in this file.
Install IPython Notebook > 3
Note that IPython Notebook has now been renamed to [[https://jupyter.org/install][Jupyter Notebook]].
#+begin_src sh
pip install jupyter
#+end_src
** What needs to be run
Have an IPython notebook running
#+begin_src sh
jupyter notebook
#+end_src

View File

@ -103,6 +103,7 @@ Backend can be chosen on a per project basis using directory local variables
If you want to use the Ensime backend, you should modify your =~/.spacemacs= to
use the recommended Ensime version (Stable). Please add the following lines to
=dotspacemacs/user-init=:
#+BEGIN_SRC emacs-lisp
(add-to-list 'configuration-layer-elpa-archives '("melpa-stable" . "stable.melpa.org/packages/"))
(add-to-list 'package-pinned-packages '(ensime . "melpa-stable"))
@ -198,9 +199,11 @@ Java projects as well.
*** Installation when using SBT
Find it with your favourite package manager, eg:
#+BEGIN_SRC shell
nix-env --install sbt
#+END_SRC
or refer to [[http://www.scala-sbt.org/download.html][the sbt installation instructions]].
*** Installation when using Gradle
@ -214,6 +217,7 @@ the development version of Ensime so follow the appropriate steps.
To use the build functions under ~SPC m b~ you need to use version =0.13.5= or
newer of =sbt=, and specify that in your project's =project/build.properties=.
For example,
#+BEGIN_SRC scala
sbt.version=0.13.11
#+END_SRC

View File

@ -40,6 +40,7 @@ this file.
To activate error checking using flycheck, install one of the [[http://www.flycheck.org/en/latest/languages.html#javascript][available linters]]
such as =ESLint= or =JSHint=:
#+BEGIN_SRC sh
$ npm install -g eslint
# or
@ -47,6 +48,7 @@ such as =ESLint= or =JSHint=:
#+END_SRC
If you install these in non-standard locations, then add the following to your =dotspacemacs/user-init= function:
#+BEGIN_SRC elisp
(add-to-list 'exec-path "/path/to/node/bins" t)
#+END_SRC
@ -95,6 +97,7 @@ such:
#+END_SRC
or when adding the =javascript= configuration layer:
#+BEGIN_SRC emacs-lisp
(javascript :variables js2-basic-offset 2)
#+END_SRC
@ -107,6 +110,7 @@ Similarly, to change how js-mode indents JSON files, set the variable
#+END_SRC
or when adding the =javascript= configuration layer:
#+BEGIN_SRC emacs-lisp
(javascript :variables js-indent-level 2)
#+END_SRC

View File

@ -1,4 +1,5 @@
#+TITLE: plantuml layer
[[file:img/logo.png]]
* Table of Contents :TOC_4_gh:noexport:

View File

@ -141,6 +141,7 @@ either =nose= or =pytest=.
#+END_SRC
If you need both then you can set =python-test-runner= to a list like this:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((python :variables python-test-runner '(pytest nose))))

View File

@ -38,6 +38,7 @@ file.
Then, you should modify your =~/.spacemacs= to use the recommended Ensime
version (Stable). Please add the following lines to =dotspacemacs/user-init=:
#+BEGIN_SRC emacs-lisp
(add-to-list 'configuration-layer-elpa-archives '("melpa-stable" . "stable.melpa.org/packages/"))
(add-to-list 'package-pinned-packages '(ensime . "melpa-stable"))
@ -65,6 +66,7 @@ To use scalastyle, it must be present as an executable in your =PATH=.
To test if =scalastyle= executable is in your path, run =scalastyle= in a new
terminal, it should output something like:
#+BEGIN_SRC bash
$ scalastyle
scalastyle 0.8.0
@ -74,6 +76,7 @@ Usage: scalastyle [options] <source directory>
Finally, enable the =syntax-checking= layer and set the =flycheck-scalastylerc=
variable to a valid location.
#+BEGIN_SRC emacs-lisp
(setq-default flycheck-scalastylerc "/usr/local/etc/scalastyle_config.xml")
#+END_SRC

View File

@ -26,6 +26,7 @@ general purpose scripting language.
First check that you are able to run this from the command line:
On OS X:
#+BEGIN_SRC sh
xcrun swift
#+END_SRC

View File

@ -39,6 +39,7 @@ For those who were asking, or are planning to, [[http://friendfeed.com/amitp/b40
some tips on how to make nyan-mode work with custom modeline.
He basically changed the mode-line-format to include:
#+begin_src emacs-lisp
(:eval (list (nyan-create)))
#+end_src

View File

@ -54,6 +54,7 @@ It should be a list of the following form:
:style released-button)
:background "#5a5a5a")))))
#+end_src
Source: [[https://gist.github.com/TheBB/f25a607b9bda4d5861f2#file-init-el-L274][gist]]
This will apply the given attributes to the relevant faces whenever the

View File

@ -1,4 +1,5 @@
#+TITLE: CFEngine layer
#+PROPERTY: header-args :eval never-export
[[file:./img/agent.png]]

View File

@ -1,4 +1,5 @@
#+TITLE: CMake layer
[[file:img/cmake.png]]
* Table of Contents :TOC_4_gh:noexport:

View File

@ -17,6 +17,7 @@ add =ranger= to the existing =dotspacemacs-configuration-layers= list in this
file.
To default with preview enabled when entering ranger:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'(ranger :variables
@ -32,63 +33,74 @@ session. Any settings that are desired on startup should be set below.
** Customizing
You toggle the use of =-= to enter ranger with `ranger-enter-with-minus`.
#+BEGIN_SRC elisp
(setq ranger-enter-with-minus t)
#+END_SRC
When disabling the mode you can choose to kill the buffers that were opened
while browsing the directories.
#+BEGIN_SRC elisp
(setq ranger-cleanup-on-disable t)
#+END_SRC
Or you can choose to kill the buffer just after you move to another entry in the
dired buffer.
#+BEGIN_SRC elisp
(setq ranger-cleanup-eagerly t)
#+END_SRC
You can choose to show dotfiles at ranger startup, toggled by =zh=
#+BEGIN_SRC elisp
(setq ranger-show-hidden t)
#+END_SRC
Define custom function used to output header of primary ranger window. Must
return a string that is placed in the header-line.
#+BEGIN_SRC elisp
(setq ranger-header-func 'ranger-header-line)
#+END_SRC
Define custom function used to output header of parent and preview windows. Must
return a string that is placed in the header-line.
#+BEGIN_SRC elisp
(setq ranger-parent-header-func 'ranger-parent-header-line)
#+END_SRC
** Parent options
You can set the number of folders to nest to the left, adjusted by =z-= and =z+=
#+BEGIN_SRC elisp
(setq ranger-parent-depth 2)
#+END_SRC
You can set the size of the parent windows as a fraction of the frame size
#+BEGIN_SRC elisp
(setq ranger-width-parents 0.12)
#+END_SRC
When increasing number of nested parent folders, set max width as fraction of
frame size to prevent filling up entire frame with parents.
#+BEGIN_SRC elisp
(setq ranger-max-parent-width 0.12)
#+END_SRC
** Preview options
You can choose to show previews literally, or through find-file, toggled by =zi=
#+BEGIN_SRC elisp
(setq ranger-show-literal t)
#+END_SRC
You can set the size of the preview windows as a fraction of the frame size
#+BEGIN_SRC elisp
(setq ranger-width-preview 0.55)
#+END_SRC
@ -96,11 +108,13 @@ You can set the size of the preview windows as a fraction of the frame size
You probably don't want to open certain files like videos when using preview. To
ignore certain files when moving over them you can customize the following to
your liking:
#+BEGIN_SRC elisp
(setq ranger-ignored-extensions '("mkv" "iso" "mp4"))
#+END_SRC
To set the max files size (in MB), set the following parameter:
#+BEGIN_SRC elisp
(setq ranger-max-preview-size 10)
#+END_SRC

View File

@ -36,9 +36,11 @@ Also there is an [[http://emacsrocks.com/e15.html][Emacs Rocks!]] episode of it.
There is support for =org-babel= and =restclient= code blocks, for instance:
#+BEGIN_EXAMPLE
#+BEGIN_SRC restclient
GET http://example.com
#+END_SRC
#+END_EXAMPLE
** Keybindings

View File

@ -24,6 +24,7 @@ add =tern= to the existing =dotspacemacs-configuration-layers= list in this
file.
You can install =tern= globally with the following command:
#+BEGIN_SRC sh
$ npm install -g tern
#+END_SRC

View File

@ -24,15 +24,18 @@ This layer integrates a BitTorrent client into Spacemacs.
* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
install and configure =transmission-daemon=. Debian example:
#+BEGIN_SRC sh
sudo apt-get -y install transmission-daemon
sudo service transmission-daemon stop
#+END_SRC
Set =rpc-authentication-required= to false (or 0 if it is numeric)
in /etc/transmission-daemon/settings.json or
configure authorization.
See transmission.el [[https://github.com/holomorph/transmission][README.org]] for details.
Start the daemon:
#+BEGIN_SRC sh
sudo service transmission-daemon start
#+END_SRC
@ -41,6 +44,7 @@ sudo service transmission-daemon start
** How to enable status auto refresh?
Add =(transmission :variables transmission-auto-refresh-all t)= to
=dotspacemacs-configuration-layers= or pick modes manually:
#+BEGIN_SRC emacs-lisp
(setq transmission-refresh-modes '(transmission-mode
transmission-files-mode

View File

@ -18,6 +18,7 @@ add =web-beautify= to the existing =dotspacemacs-configuration-layers= list in
this file.
To install =js-beautify= globally:
#+BEGIN_SRC sh
$ npm install -g js-beautify
#+END_SRC

View File

@ -30,11 +30,13 @@ You can follow wakatime installation instructions here
https://github.com/wakatime/wakatime-mode.
In short it's just:
#+BEGIN_SRC sh
pip install wakatime
#+END_SRC
And for some linux users
#+BEGIN_SRC sh
sudo pip install wakatime
#+END_SRC
@ -45,6 +47,7 @@ add =wakatime= to the existing =dotspacemacs-configuration-layers= list in this
file.
Example:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'(