The Spacemacs recommended in this issue is a new way to experience Emacs – it’s a sophisticated and refined setup that focuses on ergonomics, mnemonics, and consistency.
Just clone it and launch it, then press the space bar to browse through an interactive list of carefully selected bindings. You can also press the button for the main buffer to try out some great first key bindings.
Spacemacs can be used naturally by both Emacs and Vim users – you can even mix the two editing styles. The ability to quickly switch between input styles makes Spacemacs a great tool for pair programming.
Spacemacs feature
- Great documentation: Use. Access the Spacemacs document SPC h SPC.
- Nice GUI: You’ll like the distract-free UI and its functional mode display.
- Excellent ergonomics: All key bindings alt-m can be accessed by pressing space bar or.
- Mnemonic key binding: Commands have a mnemonic prefix SPC b, such as all buffer commands or SPC p item commands.
- Included batteries: Discover hundreds of ready-to-use software packages that are well organized in the configuration layer according to a set of conventions.
Spacemacs Core pillar
Four core pillars: mnemonics, discoverability, consistency, and “crowd configuration”.
mnemonic
Key bindings are organized using mnemonic prefixes, such as b for buffers, p for items, s for search, h for help, and so on…
Discoverable
Innovative real-time display of available key bindings. Simple query system to quickly find available layers, packages, and more.
Continuous
Thanks to a clearly defined set of conventions, similar functions have the same bindings everywhere. Documentation is mandatory for anything that comes with Spacemacs.
Crowd configuration
Community-driven configuration provides select packages that are adjusted by power users, and errors can be fixed quickly.
Update and rollback
Update Spacemacs repository
The core files and layer information for Spacemacs have been updated. However, you should always update all packages afterwards; See next section.
Spacemacs supports two different update schemes, the default being a rolling update scheme based on the latest version of available packages. This version can be found on the develop branch and updated with a simple git pull.
The second depreciation scheme is a fixed version scheme based on a set of stable packages. This version can be found on the master branch and a notification will be displayed when a new version is available. Please note that this has not been updated for a long time, so the package will be very old.
Manual update with git (for development) :
$ git pull --rebase
Automatic update (for primary server) :
Spacemacs automatically checks for new versions periodically. When it detects that a new version is available, an arrow appears in the pattern line. Click it to update Spacemacs. You must restart Emacs after the update.
Update from Spacemacs buffer (for primary server) :
Use the button labeled “Update Spacemacs” in the Spacemacs buffer. You will be prompted to enter the version to use.
Note : The master branch is considered immutable because you cannot modify it by adding your own commit. If you do this, you will break the automatic update of Spacemacs on the main branch. To fork Spacemacs code, you must use a custom branch that is manually managed.
Configuration layer
Purpose
The
hierarchy helps to gather related packages together to provide functionality. For example, the python layer provides auto-completion, syntax checking, and REPL support for python files. This approach helps keep the configuration organized and reduces user overhead by eliminating the need to think about which packages to install. To install all python features, users simply add python layers to their computer files.
Structure
The configuration is organized by layer. Each layer has the following structure:
[layer name]
|__ [local]
| |__ [package 1]
| | ...
| |__ [package n]
|-- layer.el
|__ package
|__ function
|__ configuration.el
| < / span > _ < span class = "HLJS - number" > _ < / span > key bindings. El
[] = directory
GUI elements
Spacemacs has a simple and distracting graphical UI:
- Customize power line mode line and color feedback according to the current Flycheck status
- Unicode symbol for minor mode lighters appearing in the mode line
- Flycheck’s custom edge bitmap and error feedback
Default topic
The official theme for Spacemacs is Spacemacs-Dark, which is the default theme you install when you first start spacemacs. There are two variations on the theme, one dark and one light. Some aspects of these themes can be customized in dotspacemacs/user-init your functionality ~/.spacemacs:
- Comment background with Boolean spacemacs-theme-comment-bg
- Organization section header height spacemacs-theme-org-height
Select topic
~/.spacemacs You can define your default theme dotspacemacs-themes using variables. For example, to specify spacemacs-light, leuven, and zenburn:
( setq-default dotspacemacs-themes '(spacemacs-light leuven zenburn))
dotspacemacs-themes entries are accepted with a list of layers or
dotspacemacs-additional-packages. So you can get the package from a specific location. For example, you can get topics directly from the GitHub repository with the following declaration:
( setq-default dotspacemacs-themes
'(spacemacs- light
Louvain
(zenburn: Location (Recipe: fetcher github
: repo "bbatsov/zenburn-emacs"))
))
Important: If you use :location local, then you must place your theme in the directory private/local/< theme-package-name> /, theme-package-name and as your package name suffix, -theme as stated in the Emacs convention. For example, if your theme is, foo then you have to put our theme files in the directory private/local/foo-theme.
Editor configuration
Spacemacs supports EditorConfig, a configuration file used to “define and maintain a consistent coding style across different editors and ides.”
Emacs server
Spacemacs provides the ability to start the server at startup and terminate it when you close the Emacs window. This can be done by setting the variable
dotspacemacs-enable-server for t in your ~./spacemacs.
( setq-default dotspacemacs-enable-server t)
Connect to Emacs server
You can open a file emacsclient in the terminal using Emacs. Used for emacsclient -c to open files in the Emacs GUI. Used for emacsclient -t to open a file in Emacs inside a terminal. If you set the Emacs server socket through Settings
dotspacemacs-server-socket-dir, -s ~/.emacs.d/server/server separately passes the location.
If you want your Linux or macOS system to use Emacs by default to handle any prompts, you’ll need to set it in your shell configuration, ~/.bashrc e.g. ~/.zshrc:
Export EDITOR="emacsclient -c"
Note that if you are using macOS, you may have to refer to the emacsclient that comes with GUI Emacs, for example:
Export EDITOR="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c"
Tip: Remember to use :wq or after editing the file in Emacs. C-x #
dotspacemacs-server-socket-dir You can set the location of the Emacs server socket in your Settings ~./spacemacs:
( setq-default dotspacemacs-server-socket-dir "~/.emacs/server" )
Installation
If you have an existing Emacs configuration, first back it up by running the following code in your terminal:
cd ~
mv .emacs.d .emacs.d.bak
mv .emacs .emacs.bak
Clone a repository using Git:
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
Or, if you have limited Internet connection or speed,
git clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d
—END—
Open Source protocol: GPL3.0