GithubHelp home page GithubHelp logo

tiankai0426 / centaur-emacs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 4.95 MB

Centaur Emacs 的配置

License: GNU General Public License v3.0

Dockerfile 0.03% Emacs Lisp 95.61% Makefile 0.24% HTML 1.44% JavaScript 1.41% PHP 0.01% Java 0.14% CSS 0.23% Smarty 0.05% FreeMarker 0.03% Mako 0.01% Vue 0.02% Shell 0.02% Ruby 0.13% YASnippet 0.65%

centaur-emacs's Introduction

Centaur Emacs

Build Status Release Tag License

Centaur Emacs

This is an Emacs distribution that aims to enhance the default Emacs experience. It 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.

It's able to run on Windows, GNU Linux and macOS. It is compatible ONLY with GNU Emacs 25.1 and above. In general you're advised to always run with the latest stable release - currently 26.2.

Features

  • Out of box.
  • Clean and Fast.
  • Quick fuzzy search.
  • Better Org/Markdown support.
  • Support multiple programming languages
    • C/C++/Object-C/C#/Java
    • Python/Ruby/Perl/PHP/Shell/Powershell
    • Javascript/Typescript/JSON/YAML
    • HTML/CSS/XML
    • Golang/Swift/Rust
    • ...
  • Auto completion.
  • Fly syntax check.
  • Fly spell check.
  • Git integration.
  • Project/Workspace integration.
  • Pomodor integration.
  • Better Chinese support:
    • Chinese calendar
    • Youdao dictionary
    • Pinyin search

Prerequisite

OS

  • GNU Linux
  • macOS
  • Windows (Cygwin/msys)

GNU Emacs

Please refer to Installing Emacs.

Dotfiles

Recommend to use Centaur Dotfiles.

Quick Start

Install

mv ~/.emacs.d ~/.emacs.d.bak
git clone --depth 1 https://github.com/seagle0128/.emacs.d.git ~/.emacs.d

or download the zip package directly and extract to ~/.emacs.d.

Then start Emacs. Wait for a while to install packages at the first startup. Enjoy!

Update

# Update Centaur Emacs (then restart), including configurations and packages
M-x centaur-update
M-x centaur-update-and-restart

# Update Emacs configurations only
M-x centaur-update-config

# Update ~/.dotfiles if it exists
M-x centaur-update-dotfiles

# Update packages only (then restart)
M-x centaur-update-packages
M-x centaur-update-packages-and-restart

# Update all including configurations, packages and dotfiles
M-x centaur-update-all

Docker

cd ~/.emacs.d/Dockerfile
docker build -t centaur/emacs .
docker run -it centaur/emacs bash

Customization

Customize-group

M-x customize-group and select centaur. Set and save the configurations, then restart Emacs.

Manual

Copy custom-template.el to custom.el and change the configurations, then restart Emacs.

For Example:

(setq centaur-logo nil)                        ; Logo file or nil (official logo)
(setq centaur-full-name "user name")           ; User full name
(setq centaur-mail-address "[email protected]")   ; Email address
(setq centaur-proxy "127.0.0.1:1080")          ; Network proxy
(setq centaur-package-archives 'emacs-china)   ; Package repo: melpa, melpa-mirror, emacs-china, netease or tuna
(setq centaur-theme classic)                   ; Color theme: default, classic, dark, light or daylight
(setq centaur-dashboard nil)                   ; Use dashboard at startup or not: t or nil
(setq centaur-lsp nil)                         ; Set LSP client: lsp-mode, eglot or nil
(setq centaur-benchmark t)                     ; Enable initialization benchmark or not: t or nil

The default package archives is melpa. You can change it in custom.el, or switch manually via M-x switch-package-archives anytime.

For the personal configurations, you could put to ~/.emacs.d/custom-post.el.

Screenshots

Dashboard

color_icons

markdown_magit

org

main

FAQ

  1. How to display icons correctly in Centaur Emacs?

    all-the-icons are necessary. Run M-x all-the-icons-install-fonts to install the resource fonts. all-the-icons only support GUI. If you don't like color icons, (setq all-the-icons-color-icons nil) to disable.

  2. How to search Chinese via pinyin?

    In Emacs, C-s !. If you just want to search !, use C-s \!.

  3. How to use the Centaur Dashboard?

    If centaur-dashboard is non-nil the Centaur Dashboard will be opened at startup automatically. After startup, you could use F2 to reopen it anytime. In the dashboard, please press ? or h to get the help. You can easily jump to the sections or buttons with keybindings, e.g. Homepage(H), Session(R, L), Settings(S), Update(U), Recent Files (r), Bookmarks(m) and Projects(p).

  4. Does Centaur Emacs support Language Server Protocol (LSP)?

    The LSP feature is supported and enabled by default in Centaur Emacs. lsp-mode is the default client, and eglot is another choice. Use (setq centaur-lsp nil) to disable LSP if you don't like it.

    Before use it you should install language servers. Refer to lsp-mode: supported-languages or eglot: Connecting to a server for details.

  5. How to enable plantuml in org-mode?

    Put (setq org-plantuml-jar-path "<path of plantumx.x.x.jar>") in custom.el.

  6. Why the Emacs environment variables and exec-path are different between GUI and terminal?

    Please refer to #33. You should instead set environment variables in startup files like .profile, .bash_profile or .zshenv, then Centaur Emacs is able to recognize and import the environment variables.

centaur-emacs's People

Contributors

cireu avatar ecno92 avatar fanweixiao avatar genekao avatar lemon0910 avatar seagle0128 avatar tiankai0426 avatar wow-yorick avatar

Watchers

 avatar

Forkers

demon888

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.