• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

spacemacs: spacemacs是一整套emacs扩展集合,基于evil模式,最大的特点是同时提供ema ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

spacemacs

开源软件地址:

https://gitee.com/mirrors/spacemacs

开源软件介绍:

Made with SpacemacsGPLv3 SoftwareTwitter


Spacemacs

philosophy|for whom?|screenshots|documentation|contribute|achievements|FAQ


GitterDiscordDonateDonateRecommend it


Quick Install:

This assumes you don't have an existing Emacs setup and want to run Spacemacs asyour config. If you do have one, look atthe full installation instructions for other options.

  • For stable releases:

    git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
  • For development updates and participation:

    git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
    • Windows Command Prompt:

      git clone -b develop https://github.com/syl20bnr/spacemacs %appdata%/.emacs.d

      Windows PowerShell:

      git clone -b develop https://github.com/syl20bnr/spacemacs $env:appdata/.emacs.d

Table of Contents

Introduction

Spacemacs is a new way of experiencing Emacs -- it's a sophisticated andpolished set-up, focused on ergonomics, mnemonics and consistency.

Just clone and launch it, then press the space bar to explore the interactivelist of carefully-chosen key bindings. You can also press the home buffer's[?] button for some great first key bindings to try.

Spacemacs can be used naturally by both Emacs and Vim users -- you can even mixthe two editing styles. Being able to quickly switch between input styles, makesSpacemacs a great tool for pair-programming.

Spacemacs is currently in beta, and any contributions are very welcome.

spacemacs_python

Features

  • Great documentation: access the Spacemacs documentation withSPC h SPC.
  • Beautiful GUI: you'll love the distraction free UI and its functionalmode-line.
  • Excellent ergonomics: all the key bindings are accessible by pressing thespace bar or alt-m.
  • Mnemonic key bindings: commands have mnemonic prefixes likeSPC b for all the buffer commands or SPC p for the projectcommands.
  • Batteries included: discover hundreds of ready-to-use packages nicelyorganised in configuration layers following a set ofconventions.

Documentation

Comprehensive documentation is available for each layer by pressingSPC h SPC.

You can also check the general documentation,quick start guide and the FAQ.

Getting Help

If you need help, ask your question in the Gitter Chat and a member of thecommunity will help you out.

If you prefer IRC, connect to the Gitter Chat IRC server and join the#syl20bnr/spacemacs channel.

Last but not least there are a lot of high class tutorials available on YouTube:

  • Jack of Some's Spacemacs related channel here
  • GDQuest's Game Design oriented tutorials to Spacemacs here
  • Practicalli's Clojure tutorials based on Spacemacs here
  • Eivind Fonn's classic Spacemacs ABC here

Prerequisites

Spacemacs is an extension of a popular text editor called Emacs. Thus you needto first install base Emacs and then download the Spacemacs extension files withGit.

Emacs

Spacemacs requires Emacs 27.1 or above. The development version of Emacs is notofficially supported, but it should nevertheless be expected to work.

Some modes require third-party tools that you'll have to install via yourfavorite package manager.

Linux distros

Install the emacs package with your linux distributions package manager.

Do not install the xemacs package. It's not supported by Spacemacs. XEmacs isan old fork of Emacs. The X in its name is unrelated to X11.

Emacs has graphical support.

Note: Some linux distributions support only emacs versions older than 27.1.In this case you should built from source instead.

macOS

Install emacs

Using emacs-plus
brew tap d12frosted/emacs-plus# to install Emacs 27brew install emacs-plus@27 --with-spacemacs-icon# or to install Emacs 28brew install emacs-plus@28 --with-spacemacs-iconbrew link emacs-plus
Using emacs-mac
brew tap railwaycat/emacsmacportbrew install emacs-macbrew link emacs-mac
Using cask

Homebrew now recommends to use the cask version with the following message:"Please try the Cask for a better-supported Cocoa version". To install the caskversion:

brew install --cask emacs

This installs a pre-built package from https://emacsformacosx.com/

Other ways

If you're not comfortable with the ways mentioned above, thenEmacsWiki lists downa few ways to install Emacs for macOS.

Install Source Code Pro font

Once Emacs is installed, run the following commands in the terminal to installthe default Source Code Pro font:

brew tap homebrew/cask-fontsbrew install --cask font-source-code-pro

Install Spacemacs

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

Notes:After completing the Spacemacs install process, then it's alsorecommended to add the osx layer to your dotfile. Installationinstructions are available in the documentation for the osx layer.

Depending on the installed version of GnuTLS securely installing emacspackages may fail. In this case it is possible to install usingemacs --insecure. However be aware that this means your packages willbe transferred using http, use at your own risk.

You might also have some issues when doing some search on your projects, youprobably want to install GNU ripgrepthrough homebrew:

brew install ripgrep

Windows

Download the official 64-bit (x86_64) stable builds from the GNU FTP.

You'll also need gzip and put it in your path, to download it go to theGNUWin32 project page

Install Spacemacs in Windows

By default Emacs looks for the .emacs.d directory in:C:\Users\<username>\AppData\Roaming

  • Clone Spacemacs to the Roaming directory:

    • Windows Command Prompt

      git clone -b develop https://github.com/syl20bnr/spacemacs %appdata%/.emacs.d
    • Windows PowerShell prompt:

      git clone -b develop https://github.com/syl20bnr/spacemacs $env:appdata/.emacs.d
  • Or if a HOME environment variable has been configured, that points to youruser directory: C:\Users\<username>

    Clone Spacemacs to the <username> directory:

    • Windows Command Prompt

      git clone -b develop https://github.com/syl20bnr/spacemacs %homepath%/.emacs.d
    • Windows PowerShell prompt:

      git clone -b develop https://github.com/syl20bnr/spacemacs $home/.emacs.d

Notes

  • If the following error occurs after starting Emacs:

    The directory ~/.emacs.d/server is unsafe

    Fix it by changing the owner of the directory ~/.emacs.d/server:

    • from Properties select the Tab “Security”,
    • select the button “Advanced”,
    • select the Tab “Owner”
    • change the owner to your account name

    Source: Stack Overflow

  • For efficient searches we recommend installing ripgrep.

  • Depending on the installed version of GnuTLS securely installing emacspackages may fail. In this case it is possible to install usingemacs --insecure. However be aware that this means your packages willbe transferred using http, use at your own risk.

  • The period (dot) before a file or folder name, means that it's hidden.To show hidden files and folders:

    • Press the Windows key
    • Type file explorer options
    • Select the View tab at the top
    • Check Show hidden files, folders and drives
    • Click OK

Install

Default installation

  1. If you have an existing Emacs configuration, back it up first by running thefollowing code in your terminal:

    cd ~mv .emacs.d .emacs.d.bakmv .emacs .emacs.bak

    Don't forget to backup and remove the ~/.emacs file. Otherwise SpacemacsWILL NOT be able to load. Because that file prevents Emacs from loadingthe proper initialization file.

  2. Clone the repository with Git:

    Note: Windows users, see the Windows section for the correct clone path.

    git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d

    Or in case you have a limited internet connection or speed,

    git clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d

    Note master is the stable branch and it is immutable, DO NOT make anymodification to it or you will break the update mechanism. If you want tofork Spacemacs safely, use the develop branch where you'll handle updatesmanually.

  3. (Optional) Install the default fonts

    It's recommended to install Source Code Pro by Adobe, as the defaultfont. It ensures that, for example the symbols on the modeline (bottom bar)looks correct. It's also recommended to use a "Fallback font". Thesedepend on the system:

    • GNU/Linux: NanumGothic (package named fonts-nanum on Debian, forexample)
    • macOS: Arial Unicode MS
    • Windows: MS Gothic or Lucida Sans Unicode

    If the modeline doesn't look similar to thepicture at the top of this page, then make sure you have thecorrect fallback font installed.

    If you're running in a terminal then you'll also need to change the terminalsfont settings.

  4. Launch Emacs. Spacemacs will automatically install the packages it requires.

  5. Launch Emacs, and answer the questions in the Dotfile wizard installer. Ifyou are new to Emacs and Spacemacs, then it's fine to just accept the defaultchoices. It's easy to try the other choices later, without having toreinstall Spacemacs. They can be changed in the dotfile ~/.spacemacs.

    After answering the questions, then Spacemacs starts downloading andinstalling the packages it requires. When the packages have been installed.Restart Emacs to complete the installation.

Notes:If you are behind a firewall or similar and you get an error regarding packagedownloads then you may try to disable the HTTPS protocol by starting Emacs with

emacs --insecure

but this should be a last resort because of the security implications.

You can set the dotspacemacs-elpa-https variable to nil in yourdotfile ~/.spacemacs but this has the same security implications as theinsecure flag. You may also want to clear out your .emacs.d/elpadirectory before doing this, so that any corrupted packages you may havedownloaded will be re-installed.

error: Package 'package-build-' is unavailable may occur due to heavy networktaffic. You can fix it by setting the dotspacemacs-elpa-timeout variable to70 in your dotfile.

Warning (bytecomp) and other compilation warnings are perfectly normal. Ifyou're curious, you can find out why these occur here.

If the mode-line turns red then be sure to consult the FAQ.

Alternative installations

There are currently, two supported, alternative locations, for a Spacemacsconfiguration.

Modify HOME environment variable

This solution is ideal for quickly trying Spacemacs without compromising yourexisting configuration. Clone Spacemacs outside the Emacs dotdirectory~/.emacs.d and modify the HOME environment variable.

mkdir ~/spacemacsgit clone https://github.com/syl20bnr/spacemacs.git ~/spacemacs/.emacs.dHOME=~/spacemacs emacs

Note: If you're using the Fish shell, then you'll need to modify the lastcommand to: env HOME=$HOME/spacemacs emacs

Modify spacemacs-start-directory variable

This solution is better suited to "embed" Spacemacs into your own configuration.If you've cloned Spacemacs into ~/.emacs.d/spacemacs/, then drop the followinglines in the ~/.emacs.d/init.el file:

(setq spacemacs-start-directory "~/.emacs.d/spacemacs/")(load-file (concat spacemacs-start-directory "init.el"))

Spacemacs logo

For Linux users, create spacemacs.desktop in ~/.local/share/applications/ using this as a reference. Change the Name parameter to Name=Spacemacs and the Icon parameter to Icon=/PATH/TO/EMACSD/core/banners/img/spacemacs.png where PATH/TO/EMACSD is the path to your .emacs.d directory, usually ~/.emacs.d or ~/.config/emacs.

For macOS users, you need to download the .icns version of the logo,then change the logo on the Dock.

Update

Spacemacs supports two different update schemes, the default is a rolling update scheme basedon the latest version of packages available. This version can be found on the develop branchand is updated by a simple git pull.

The second depreciated one is a fixed version scheme which is based on a stable setof packages. This version can be found on the master branch and will show a notification whena new version is available. Be warned this has not been updated in a long time now so packageswill be very old.

Rolling update (on develop)

  1. Close Emacs and update the git repository:

    git pull --rebase
  2. Restart Emacs to complete the upgrade.

Automatic update (on master branch)

When a new version is available then a little arrow appears in the mode-line.

Its color depends on the number of versions that have been released since yourlast update. Green means that you have a recent version, orange and red meansthat you have an older version.

powerline_update

Click on the arrow to update Spacemacs to the latest version.

Manual update (on master branch)

Remove the < and > angle brackets when you're typing the lines below intoyour shell. And replace the text: "tag version which you are updating to" with atagged version. This page lists the latest tags

git fetchgit reset --hard <tag version which you are updating to>

Revert to a specific version (on master branch)

To revert to a specific version, just checkout the corresponding branch. Forinstance to revert to version 0.200, type the following command:

git checkout origin/release-0.200

After updating Spacemacs (either manually or automatically), then you alsoshould check if any updates are available for your packages. On the SpacemacsHome Buffer SPC b h, click (press RET) on the [Update Packages] button.

Quotes

Quote by ashnur:

«I feel that spacemacs is an aircraft carrier and I am playing table tennison the deck as a freerider.»

Quote by deuill:

«I LOVE SPACEMACS AND MAGIT That is all»

Contributions

Spacemacs is a community-driven project, it needs you to keep it up to dateand to propose great and useful configurations for all the things!

Before contributing be sure to consult thecontribution guidelines and conventions.

Communities

Spacemacs Everywhere

Once you've learned the Spacemacs key bindings, you can use them in other IDEs/tools, thanks to the following projects:

  • Intellimacs - Spacemacs' like key bindings for IntelliJ platform
  • Spaceclipse - Spacemacs’ like key bindings for Eclipse
  • SpaceVim - A community-driven modular vim distribution
  • VSpaceCode - Spacemacs’ like key bindings for Visual Studio Code

License

The license is GPLv3 for all parts specific to Spacemacs, this includes:

  • the initialization and core files
  • all the layer files
  • the documentation

For the packages shipped in this repository, you can refer to the files header.

Spacemacs logo by Nasser Alshammari released under aCreative Commons Attribution-ShareAlike 4.0 International License.

Supporting Spacemacs

The best way to support Spacemacs is to contribute to it either by reportingbugs, helping the community on the Gitter Chat or sending pull requests.

You can show your love for the project by getting cool Spacemacs t-shirts, mugsand more in the Spacemacs Shop.

If you want to show your support financially, then you can contribute toBountysource, or buy a drink for the maintainer by clicking on thePaypal badge.

If you used spacemacs in a project, and you want to show that fact, you can usethe spacemacs badge: Built with Spacemacs

  • For Markdown:

    [![Built with Spacemacs](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)](https://develop.spacemacs.org)
  • For HTML:

    <a href="https://develop.spacemacs.org"><img alt="Built with Spacemacs" src="https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg" /></a>
  • For Org-mode:

    [[https://develop.spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]

Thank you!


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ulipad: wxpython+python的编辑器发布时间:2022-03-25
下一篇:
pview: java开发的一个漂亮的图片查看器发布时间:2022-03-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap