Giter Site home page Giter Site logo

spacemacs-dotfiles's Introduction

spacemacs-dotfiles

Install Emacs

# Install it with this command:
$ brew install emacs --HEAD --use-git-head --cocoa --srgb
# To get Emacs into Application folder 
$ brew linkapps
# Update alias to make homebrew emacs default emacs by adding the following line to .bash_profile
alias emacs="/usr/local/Cellar/emacs/HEAD/bin/emacs -nw --insecure"

Install ag search

brew install ag

Install spacemacs 0.200.13

git clone -b 'v0.200.13' --single-branch --depth 1  https://github.com/syl20bnr/spacemacs.git

Install dotfiles

git clone [email protected]:dangnm/spacemacs-dotfiles.git
mv spacemacs-dotfiles ~/.spacemacs.d

Setup Spacemacs

Run sh ~/.spacemacs.d/link.sh to toggle
OR 
ln -sf ~/spacemacs/assets ~/.emacs.d/assets
ln -sf ~/spacemacs/core ~/.emacs.d/core
ln -sf ~/spacemacs/init.el ~/.emacs.d/init.el
ln -sf ~/spacemacs/layers ~/.emacs.d/layers
ln -sf ~/spacemacs/private ~/.emacs.d/private
ln -sf ~/spacemacs/spacemacs.mk ~/.emacs.d/spacemacs.mk

Restore default emacs (optional)

Run sh ~/.spacemacs.d/link.sh to toggle
OR 
unlink ~/.emacs.d/assets
unlink ~/.emacs.d/core
unlink ~/.emacs.d/init.el
unlink ~/.emacs.d/layers
unlink ~/.emacs.d/private
unlink ~/.emacs.d/spacemacs.mk

Run spacemacs in 0.1s

Add this code to .zshenv and run emacs by typing "em"

  unalias em >/dev/null 2>&1
  em() {
    if [[ $(ps aux | grep -w "emacs --daemon" | grep -v grep | wc -l) -gt 0 ]]; then
        echo "daemon is running"
        if [[ $(ps aux | grep -w "emacs --daemon" | grep -v grep | wc -l) -gt 1 ]]; then
            kill -9 $(ps aux | grep 'emacs --daemon' | grep -v 'grep' | awk '{print $2}')
            emacs --daemon
        fi
    else
        echo "daemon is starting"
        emacs --daemon
    fi

    if [[ "$@" == "" ]]; then
        emacsclient -create-frame --alternate-editor="" .
    else
        emacsclient -create-frame --alternate-editor="" "$@"
    fi
  }

spacemacs-dotfiles's People

Contributors

dangnm avatar

Watchers

James Cloos avatar  avatar

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.