Spacemacs A new way to experience Emacs

Spacemacs A new way to experience Emacs

2022-10-28 0 1,492
Resource Number 47015 Last Updated 2025-02-21
¥ 0HKD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

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.

Spacemacs A new way to experience Emacs插图

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

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free Source Code Spacemacs A new way to experience Emacs https://ictcoder.com/spacemacs-a-new-way-to-experience-emacs/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services