forked from bbatsov/prelude
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure the README into a manual
- Loading branch information
Showing
17 changed files
with
789 additions
and
683 deletions.
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Configuration | ||
|
||
## Color Themes | ||
|
||
Emacs provides a dozen of | ||
built-in themes you can use out-of-the-box by invoking the `M-x | ||
load-theme` command. | ||
|
||
[Zenburn](https://github.com/bbatsov/zenburn-emacs) is the default | ||
color theme in Prelude, but you can change it at your discretion. Why | ||
Zenburn? I (and lots of hackers around the world) find it pretty neat | ||
for some reason. Personally I find the default theme pretty tiresome | ||
for the eyes, that's why I took that "controversial" decision to | ||
replace it. You can, of course, easily go back to the default (or | ||
select another theme entirely). | ||
|
||
To disable Zenburn just put in your personal config the following | ||
line: | ||
|
||
```lisp | ||
(disable-theme 'zenburn) | ||
``` | ||
|
||
Or you can use another theme altogether by adding something in `personal/preload` like: | ||
|
||
```lisp | ||
(setq prelude-theme 'tango) | ||
``` | ||
|
||
**Note** To use a non-built-in theme, like [Solarized](https://github.com/bbatsov/zenburn-emacs), | ||
you'll have to install it from MELPA first by `M-x package-install RET solarized-theme`. Then add | ||
|
||
``` lisp | ||
(setq prelude-theme 'solarized-dark) | ||
``` | ||
in `personal/preload`. | ||
|
||
Finally, if you don't want any theme at all, you can add this to your | ||
`personal/preload`: | ||
|
||
```lisp | ||
(setq prelude-theme nil) | ||
``` | ||
|
||
## Personalizing | ||
|
||
All files you create under the `personal/` directory are yours for | ||
personalization. There is no single special personal config file -- | ||
any files you create in the `personal/` directory will be loaded in | ||
lexicographical order. The overall loading precedence is: | ||
|
||
1. `personal/preload/*` | ||
2. `core/` | ||
3. `prelude-modules.el` | ||
4. `personal/*` | ||
|
||
#### Personalization Example | ||
|
||
Suppose you want to configure `go-mode` to autoformat on each save. You | ||
can create a file in `personal/`, let's call this one | ||
`config-go-mode.el` and add the following to it. | ||
|
||
``` emacs-lisp | ||
(add-hook 'go-mode-hook | ||
(lambda () | ||
(add-hook 'before-save-hook 'gofmt-before-save) | ||
(setq tab-width 2))) | ||
``` | ||
|
||
#### Tips | ||
|
||
**Fork** (instead of cloning) the official Prelude repo and add your | ||
own touch to it. You're advised to **avoid changing stuff outside of | ||
the personal folder** to avoid having to deal with git merge conflicts | ||
in the future. | ||
|
||
If you'd like to add some auto installation of packages in your | ||
personal config use the following code: | ||
|
||
```lisp | ||
(prelude-require-packages '(some-package some-other-package)) | ||
``` | ||
|
||
If you require just a single package you can also use: | ||
|
||
```lisp | ||
(prelude-require-package 'some-package) | ||
``` | ||
|
||
### Preloading personal config | ||
|
||
Sometimes you might want to load code before Prelude has started loading. Prelude will automatically preload all | ||
Emacs Lisp files in your `personal/preload` directory. Note that at this point you can't using anything from | ||
Prelude, except a few variables like `prelude-dir`, etc (since nothing is yet loaded). | ||
|
||
### Disabling whitespace-mode | ||
|
||
Although `whitespace-mode` is awesome, some people might find it too | ||
intrusive. You can disable it in your | ||
personal config with the following bit of code: | ||
|
||
```lisp | ||
(setq prelude-whitespace nil) | ||
``` | ||
|
||
If you like `whitespace-mode`, but prefer it to not automatically | ||
cleanup your file on save, you can disable that behavior by setting | ||
`prelude-clean-whitespace-on-save` to `nil` in your config file with: | ||
|
||
```lisp | ||
(setq prelude-clean-whitespace-on-save nil) | ||
``` | ||
|
||
The `prelude-clean-whitespace-on-save` setting can also be set on a | ||
per-file or directory basis by using a file variable or a | ||
`.dir-locals.el` file. | ||
|
||
|
||
### Disable flyspell-mode | ||
|
||
If you're not fond of spellchecking on the fly: | ||
|
||
```lisp | ||
(setq prelude-flyspell nil) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## Issues | ||
|
||
Report issues and suggest features and improvements on the | ||
[GitHub issue tracker](https://github.com/bbatsov/prelude/issues). Don't ask | ||
questions on the issue tracker - use the [support channels](support.md) instead. | ||
|
||
If you want to file a bug, please provide all the necessary info listed in | ||
our issue reporting template (it's loaded automatically when you create a | ||
new GitHub issue). | ||
|
||
## Patches | ||
|
||
Patches in any form are always welcome! GitHub pull requests are even better! :-) | ||
|
||
Before submitting a patch or a pull request make sure that your patch | ||
is in line with the [contribution | ||
guidelines](https://github.com/bbatsov/prelude/blob/master/CONTRIBUTING.md). | ||
|
||
## Documentation | ||
|
||
Good documentation is just as important as good code. | ||
|
||
Consider improving and extending the | ||
this manual and the | ||
[community wiki](https://github.com/bbatsov/prelude/wiki). | ||
|
||
### Working on the Manual | ||
|
||
The manual is generated from the markdown files in the | ||
[doc](https://github.com/bbatsov/prelude/tree/master/doc) folder of Prelude's | ||
GitHub repo and is published to [Read the Docs](readthedocs.org). The | ||
[MkDocs](http://www.mkdocs.org/) tool is used to convert the markdown sources to | ||
HTML. | ||
|
||
To make changes to the manual you simply have to change the files under | ||
`doc`. The manual will be regenerated automatically when changes to those files | ||
are merged in `master` (or the latest stable branch). | ||
|
||
You can install `MkDocs` locally and use the command `mkdocs serve` to see the | ||
result of changes you make to the manual locally: | ||
|
||
```sh | ||
$ cd path/to/prelude/repo | ||
$ mkdocs serve | ||
``` | ||
|
||
If you want to make changes to the manual's page structure you'll have to edit | ||
[mkdocs.yml](https://github.com/bbatsov/prelude/blob/master/mkdocs.yml). | ||
|
||
## Donations | ||
|
||
You can support the development of Prelude via | ||
[Salt](https://salt.bountysource.com/teams/prelude), | ||
[Patreon](https://www.patreon.com/bbatsov) and | ||
[Liberapay](https://liberapay.com/bbatsov/donate). | ||
|
||
[![Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/bbatsov/donate) | ||
[![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/bbatsov) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* By default kbd doesn't stand out very much. Let's fix this! */ | ||
kbd { | ||
padding: 3px 5px; | ||
border: solid 1px #ccc; | ||
background-color: #fcfcfc; | ||
border-radius: 3px; | ||
box-shadow: inset 0 -1px 0 #bbb; | ||
display: inline-block; | ||
} | ||
|
||
/* The default font-size for code blocks is 75% which makes code | ||
hard to read. */ | ||
code { | ||
font-size: 90%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Frequently Asked Questions | ||
|
||
Coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Emacs Prelude | ||
|
||
Prelude is an Emacs distribution that aims to enhance the default | ||
Emacs experience. Prelude alters a lot of the default settings, | ||
bundles a plethora of additional packages and adds its own core | ||
library to the mix. The final product offers an easy to use Emacs | ||
configuration for Emacs newcomers and lots of additional power for | ||
Emacs power users. | ||
|
||
Prelude is compatible **ONLY with GNU Emacs 25.1+**. In general you're | ||
advised to always run Prelude with the latest Emacs - currently | ||
**26.1**. | ||
|
||
You can support the development of Prelude via | ||
[PayPal](https://www.paypal.me/bbatsov), | ||
[Salt](https://bountysource.com/teams/prelude), | ||
[Patreon](https://www.patreon.com/bbatsov) and | ||
[Liberapay](https://liberapay.com/bbatsov/donate). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Installation | ||
|
||
## Installing Emacs | ||
|
||
Obviously to use the Emacs Prelude you have to install Emacs | ||
first. Have a look at | ||
the | ||
[WikEmacs articles on installing Emacs](http://wikemacs.org/index.php/Installing_Emacs). | ||
|
||
## Installation | ||
|
||
### Automated | ||
|
||
You can install **Emacs Prelude** via the command line with either `curl` or | ||
`wget`. Naturally `git` is also required. | ||
|
||
#### Via Curl | ||
|
||
If you're using `curl` type the following command: | ||
|
||
```bash | ||
curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh | ||
``` | ||
|
||
#### Via Wget | ||
|
||
If you're using `wget` type: | ||
|
||
```bash | ||
wget --no-check-certificate https://github.com/bbatsov/prelude/raw/master/utils/installer.sh -O - | sh | ||
``` | ||
|
||
### Manual | ||
|
||
Make sure you do not have any `~/.emacs` file present. | ||
|
||
```bash | ||
git clone git://github.com/bbatsov/prelude.git path/to/local/repo | ||
ln -s path/to/local/repo ~/.emacs.d | ||
cd ~/.emacs.d | ||
``` | ||
|
||
If you are using Windows, you should check what Emacs thinks the `~` directory is by running Emacs and typing `C-x d ~/<RET>`, and then adjust the command appropriately. | ||
|
||
## Updating Prelude | ||
|
||
### Manual update | ||
|
||
The update procedure is fairly straightforward and consists of 3 steps: | ||
|
||
#### Update all bundled packages | ||
|
||
Just run <kbd>M-x package-list-packages RET U x</kbd>. | ||
|
||
#### Update Prelude's code | ||
|
||
```bash | ||
cd path/to/prelude/installation | ||
git pull | ||
``` | ||
|
||
The `path/to/prelude/installation` is usually `~/.emacs.d` (at least | ||
on Unix systems). | ||
|
||
#### Restart Prelude | ||
|
||
It's generally a good idea to stop Emacs after you do the update. The | ||
next time Prelude starts it will install any new dependencies (if | ||
there are such). | ||
|
||
### Automatic update | ||
|
||
Simply run <kbd>M-x prelude-update</kbd> from Emacs itself and restart Emacs afterwards. | ||
|
||
## Pinning packages | ||
|
||
By default, Prelude will install packages from the melpa and gnu package | ||
repositories. Occasionally package integration can break when upgrading packages. | ||
This can be avoided by pinning packages to stable versions in other repositories. | ||
To do so, copy `prelude-pinned-packages.el` from the sample directory to | ||
Prelude's root directory and adjust the [variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html) | ||
inside accordingly. | ||
|
||
## Enabling additional modules | ||
|
||
By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the [docs](modules/index.md). | ||
|
||
```lisp | ||
;;; Uncomment the modules you'd like to use and restart Prelude afterwards | ||
(require 'prelude-c) | ||
;; (require 'prelude-clojure) | ||
;; (require 'prelude-coffee) | ||
;; (require 'prelude-common-lisp) | ||
;; (require 'prelude-css) | ||
(require 'prelude-emacs-lisp) | ||
(require 'prelude-erc) | ||
;; (require 'prelude-erlang) | ||
;; (require 'prelude-elixir) | ||
;; (require 'prelude-haskell) | ||
(require 'prelude-js) | ||
;; (require 'prelude-latex) | ||
(require 'prelude-lisp) | ||
(require 'prelude-org) | ||
(require 'prelude-perl) | ||
;; (require 'prelude-python) | ||
;; (require 'prelude-ruby) | ||
;; (require 'prelude-scala) | ||
(require 'prelude-scheme) | ||
;; (require 'prelude-scss) | ||
;; (require 'prelude-web) | ||
(require 'prelude-xml) | ||
``` | ||
|
||
You'll need to adjust your `prelude-modules.el` file once the | ||
installation is done. If you are doing a manual install then you first | ||
need to copy the `prelude-modules.el` available in the sample | ||
directory to the root of `path/to/prelude/installation` and then | ||
adjust that one. | ||
|
||
After you've uncommented a module you should either restart Emacs or evaluate the module | ||
`require` expression with <kbd>C-x C-e</kbd>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.