Skip to content

naohisas/dot.emacs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dot.emacs

This repository contains my Emacs configuration files and some emacs packages stored in the .emacs.d directory for Mac and Linux.

Installation

Fist of all, simply download dot.emacs from this site by clinking the green button "Clone or download" or directly clone it on Terminal as follows:

$ git clone https://github.com/naohisas/dot.emacs.git

dot.emacs

Copy ".emacs" and ".emacs.d" to your home directory.

$ cd dot.emacs
$ cp -a .emacs* ~/

Change the following local variables in ~/.emacs to your name and email address.

(setq user-full-name    "Your name")
(setq user-mail-address "Your email address")

Emacs for Mac

Older version of Emacs (Emacs22) is iinstalled by default with Mac OS. So it is suggested you to install new one on your Mac.

New Emcas (Emacs 25.1) can be installed with Homebrew in Mac.

$ brew tap caskroom/cask
$ brew cask install emacs

For Apple M1, Emacs can be installed as follows:

$ brew install --cask emacs

The installed Emacs.app can be opened from Terminal.

$ open -a /Application/Emacs.app

The following alias is optional, but it's recommended if you like to start by typing 'emacs' on Terminal. Create the alias in your shell. To make it permanent, put that line to your .profile (or .bash_profile, etc) at home directory

$ alias emacs="open -a /Applications/Emacs.app"

or

$ alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs 2>/dev/null"

For Apple M1, arch -x86_64 is required as follows:

$ alias emacs="arch -x86_64 /Applications/Emacs.app/Contents/MacOS/Emacs 2>/dev/null"

Customization

Appearance of emacs can be changed by modifying ~/.emacs.d/listp/config_appearance.el.

To change colors (foreground, background, etc.), modify the frame parameters in the variable default-frame-alist

(setq default-frame-alist
      (append
       (list
        '(top . 0)
        '(left . 0)
        '(foreground-color . "black")
        '(background-color . "wheat")
        '(border-color .     "black")
        '(mouse-color .      "white")
        '(cursor-color .     "black"))
       default-frame-alist))

To change modeline color, modify the following colors.

(set-face-foreground 'mode-line "#ffffff")
(set-face-background 'mode-line "#b40000")

To enable menu bar, turn on menu-bar-mode.

(menu-bar-mode 1)

To enable tool bar, turn on tool-bar-mode.

(tool-bar-mode 1)

Global Settings for Mac

To be enabled to scroll up/down by block and select a region on Emacs by using control + arrows and space, disable several shortcuts for Misson Control and Spotlight in System Preferances.

  1. Open "System Preferences"
  2. Click "Keyboard" in Hardware
  3. Select "Misson Control" in the Shortcuts tab
  4. Uncheck "Mission Control" and "Application windows"
  5. Uncheck "Move left a space" and "Move right a space"
  6. Select "Spotlight" in the Shortcuts tab
  7. Uncheck "Show Spotlight search"

Releases

No releases published

Packages

No packages published