Skip to content

Commit

Permalink
Fix merge conflicts, enable org mode in default startup scratch buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
lnfinite Monkeys committed Oct 4, 2019
2 parents 31eea5e + c650fa5 commit b2b911b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 31 deletions.
30 changes: 23 additions & 7 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
#+TITLE: Emacs mode for the TimeLines live coding language
* Installation
Download or ~git-clone~ this repository to a path on your machine and add the
following lines to your ~.emacs~ or ~.emacs.d/init.el~ files:
There are two things here:
1. An Emacs major mode for creating and interacting with a live TimeLines
session.
2. (What I consider to be) A set of sensible default settings and packages to
get someone started with Emacs, together with a mini tutorial.
** Installation
*** Emacs Config
If you are new to Emacs and want to get started quickly, clone this repo by executing
**** Linux & OS X
#+BEGIN_SRC
git clone https://github.com/lnfiniteMonkeys/TimeLines-emacs.git ~/.emacs.d
#+END_SRC
**** Windows
#+BEGIN_SRC git clone
setx HOME ^%HOMEDRIVE^%^%HOMEPATH^%
git clone https://github.com/lnfiniteMonkeys/TimeLines-emacs.git %HOME%\.emacs.d
#+END_SRC
If there is a ~.emacs~ file in your home directory then delete it.
*** timelines-mode
If you already have an Emacs config and just want to use this mode, clone
this repo in a directory, for example ~git clone https://github.com/lnfiniteMonkeys/TimeLines-emacs.git
~/timelines-emacs~, and add the following lines to your init file, replacing the paths respectively:
#+BEGIN_SRC elisp
(add-to-list 'load-path "~/path/to/timelines-mode")
(require 'timelines-mode)
(load "~/path/to/timelines-mode.el")
(setq timelines-path "~/path/to/timelines/source")
#+END_SRC
replacing the correct paths to timelines-mode (this repo) and the timelines
source (https://github.com/lnfiniteMonkeys/TimeLines).
57 changes: 33 additions & 24 deletions init.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
;;;;;;;;;;;;;; Setup package stuff
;;; An example config file to get you started with Emacs.
;;; It uses use-package for automatic package installation and management,
;;; it maintains the familiar-to-many Ctrl-c for copy, Ctrl-x for cut, Ctrl-v for paste.

;;;;;;;;;;;;;;;;; Setup package stuff
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
Expand Down Expand Up @@ -46,25 +50,32 @@
(use-package which-key
:config (which-key-mode))

;; Instal ido for autocompletion
;; Use ido for autocompletion
(use-package ido
:config
(ido-mode 1)
(setq ido-enable-flex-matching nil)
(setq ido-create-new-buffer 'always)
(setq ido-everywhere t)
(ido-mode 1))
(setq ido-enable-flex-matching nil
ido-create-new-buffer 'always
ido-everywhere t))

(use-package ido-vertical-mode
:init
(ido-vertical-mode 1))

;; Type 'y' or 'n' instead of 'yes' or 'no'
(fset 'yes-or-no-p 'y-or-n-p)

;; Replaces a selection with any letter pressed
(delete-selection-mode 1)

(setq scroll-conservatively 100)


;;;;;;;;;;;;;; Setup themes and other aesthetic stuff

;; Set the theme and the cursor's colour
;; Set the mood, there's plenty of other themes to choose from here:
;; https://emacsthemes.com/popular/index.html
(use-package monokai-theme)
(set-cursor-color "#ff1493")

;; Set the window's name
(setq frame-title-format "TimeLines")
Expand All @@ -76,31 +87,26 @@
(scroll-bar-mode -1)
(tooltip-mode -1))

;; Type 'y' or 'n' instead of 'yes' or 'no'
(fset 'yes-or-no-p 'y-or-n-p)

;; Replaces a selection with any letter pressed
(delete-selection-mode 1)

(line-number-mode 1)
(show-paren-mode 1)

;; Hihlight the line the cursor is on
;; Cursor settings
(blink-cursor-mode 0)
(set-default 'cursor-type 'box)
(set-cursor-color "#ff1493")

;; Highlight the line the cursor is on
(global-hl-line-mode t)

;; Operate on visual, rather than logical, lines
(add-hook 'text-mode-hook 'turn-on-visual-line-mode)

;; Reload the init file
;; Reload the init file with a key binding
(global-set-key (kbd "C-c p")
(lambda() (interactive)
(load-file "~/.emacs.d/init.el")))
(lambda ()
(interactive)
(load-file "~/.emacs.d/init.el")))

(setq scroll-conservatively 100)

;; Cursor settings
(blink-cursor-mode 0)
(set-default 'cursor-type 'box)

;; Clean up startup behaviour
(setq inhibit-startup-message t)
Expand All @@ -118,14 +124,17 @@
(get-buffer "*scratch*"))
(with-current-buffer "*scratch*"
(erase-buffer)
(insert-file-contents startup-file))))
(insert-file-contents startup-file)
(org-mode))))

;;;;;;;;;;;;;; Lastly, load a local-config.el file if it exists. This is where you should put your own configuration.

(let ((local-config "~/.emacs.d/local-config.el"))
(when (file-exists-p local-config)
(load-file local-config)))

(setq initial-major-mode 'lisp-interaction-mode)

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
Expand Down

0 comments on commit b2b911b

Please sign in to comment.