Skip to content

Commit

Permalink
Merge branch 'develop' (v0.31.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Dec 13, 2014
2 parents 0857775 + 7300ceb commit dd28c5b
Show file tree
Hide file tree
Showing 20 changed files with 424 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ python-*-docs-html
# Private directory
private/*
!private/README.md
/games/
51 changes: 38 additions & 13 deletions contrib/lang/autohotkey/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
# Autohotkey contribution layer for Spacemacs #
# Autohotkey contribution layer for Spacemacs

Syntax highlighting and Emacs functions for use with [AutoHotkey][www.autohotkey.com] or [AutoHotkey_L][ahkscript.org]. Using a combined implementation of ahk-mode from Xah Lee's `xahk-mode` and Robert Widhopf-Fenk's `autohotkey-mode`. Updated with the latest ahk and ahk_l commands found in the latest revision of [SciTE4AutoHotkey[http://fincs.ahk4.net/scite4ahk/].
![logo](ahk.png)

Contributed and maintained by [Rich Alesi][https://www.github.com/ralesi].
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**

## Features ##
- [Autohotkey contribution layer for Spacemacs](#autohotkey-contribution-layer-for-spacemacs)
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [Key Bindings](#key-bindings)

- **Auto-completion**
- **Documentation Lookup**
- **Execute Code Snippets
- **Correct Indentation and Commenting**
<!-- markdown-toc end -->

## Description

Syntax highlighting and Emacs functions for use with [AutoHotkey][] or
[AutoHotkey_L][].

Using a combined implementation of ahk-mode from Xah Lee's `xahk-mode`
and Robert Widhopf-Fenk's `autohotkey-mode`. Updated with the latest
ahk and ahk_l commands found in the latest revision of
[SciTE4AutoHotkey][].

Contributed and maintained by [Rich Alesi][].

## Features

- Auto-completion
- Documentation Lookup
- Execute Code Snippets
- Correct Indentation and Commenting

## Install

To use this contribution add it to your `~/.spacemacs`

```elisp
(defvar dotspacemacs-configuration-layers '(autohotkey)
(setq-default dotspacemacs-configuration-layers '(autohotkey)
"List of contribution to load."
)
```

## Key Bindings

Key Binding | Description
------------------|------------------------------------------------------------
`<SPC> m D` | open documentation in `browser`
`<SPC> m E` | execute file with `autohtokey.exe`
Key Binding | Description
--------------------|------------------------------------------------------------
<kbd>SPC m D</kbd> | open documentation in `browser`
<kbd>SPC m E</kbd> | execute file with `autohtokey.exe`

[AutoHotkey]: http://www.autohotkey.com
[AutoHotkey_L]: http://ahkscript.org
[SciTE4AutoHotkey]: http://fincs.ahk4.net/scite4ahk/
[Rich Alesi]: https://www.github.com/ralesi
Binary file added contrib/lang/autohotkey/ahk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions contrib/lang/windows-scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Windows Scripting contribution layer for Spacemacs

![logo](ps.png)

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**

- [Windows Scripting contribution layer for Spacemacs](#windows-scripting-contribution-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Key Bindings](#key-bindings)
- [Powershell](#powershell)
- [Batch (dos.el)](#batch-dosel)

<!-- markdown-toc end -->

## Description

This simple layer adds support for the Powershell scripting language as well
as support for batch files.

Incuded packages for extensions:
- `.ps1`: [powershell][]
- `.bat`: [dos.el][]

## Install

To use this contribution add it to your `~/.spacemacs`

```elisp
(setq-default dotspacemacs-configuration-layers '(windows-scripts)
"List of contribution to load."
)
```

## Key Bindings

### Powershell

No useful bindings.

### Batch (dos.el)

Key Binding | Description
----------------------|------------------------------------------------------------
<kbd>SPC m D</kbd> | ask for a command and display help
<kbd>SPC m e b</kbd> | evaluate buffer
<kbd>SPC m e B</kbd> | evaluate buffer with args
<kbd>SPC m s</kbd> | insert separator ` & `
<kbd>SPC m t</kbd> | mini snippet to start a batch script
<kbd>SPC m T</kbd> | big snippet to start a batch script
<kbd>SPC m z</kbd> | toggle outline

[powershell]: https://github.com/jschaf/powershell.el
[dos.el]: http://www.emacswiki.org/emacs/dos.el
28 changes: 28 additions & 0 deletions contrib/lang/windows-scripts/extensions.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
;; Post extensions are loaded *after* the packages
(defvar windows-scripts-post-extensions '(dos))

;; Initialize the extensions

(defun windows-scripts/init-dos ()
(use-package dos
:commands dos-mode
:mode ("\\.bat$" . dos-mode)
:init
(progn
(defun windows-scripts/dos-outline-hook ()
(local-set-key (kbd "SPC m z") 'dos-mode)
(defun outline-mouse-select ()
"Select position and return to `dos-mode'."
(interactive)
(dos-mode)
(beginning-of-line)))
(add-hook 'outline-mode-hook 'windows-scripts/dos-outline-hook))
:config
(evil-leader/set-key-for-mode 'dos-mode
"mD" 'dos-help-cmd
"meb" 'dos-run
"meB" 'dos-run-args
"ms" 'dos-sep
"mt" 'dos-template-mini
"mT" 'dos-template
"mz" 'dos-outline)))
File renamed without changes.
10 changes: 10 additions & 0 deletions contrib/lang/windows-scripts/packages.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(defvar windows-scripts-packages
'(
powershell
)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

(defun windows-scripts/init-powershell ()
(use-package powershell
:defer t))
Binary file added contrib/lang/windows-scripts/ps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions contrib/osx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# OSX contribution layer for Spacemacs

![applogo](apple.png)![osxlogo](osx.png)

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**

- [OSX contribution layer for Spacemacs](#osx-contribution-layer-for-spacemacs)
- [Description](#description)
- [Philosophy](#philosophy)
- [Install](#install)
- [Key Bindings](#key-bindings)
- [Future Work](#future-work)

<!-- markdown-toc end -->

## Description

Spacemacs is not just emacs+vim. It can have OSX keybindings too!
This layer globally defines common OSX keybindings. ⌘ is set to
`super` and ⌥ is set to `meta`. Aside from that, there's nothing
much, really.

## Philosophy

While this layer enables common OSX bindings, it does not implement
OSX navigation keybindings. Spacemacs is meant to be used with evil,
and we encourage you to do so :)

## Install

To use this configuration layer, add it to your `~/.spacemacs`

```
(setq-default dotspacemacs-configuration-layers '(osx)
"List of contribution to load."
)
```

## Key Bindings

Key Binding | Description
------------------|------------------------------------------------------------
<kbd>⌘ q</kbd> | Quit
<kbd>⌘ v</kbd> | Paste
<kbd>⌘ c</kbd> | Copy
<kbd>⌘ x</kbd> | Cut
<kbd>⌘ w</kbd> | Close window
<kbd>⌘ z</kbd> | Undo
<kbd>⌘ Z</kbd> | Redo
<kbd>⌃ ⌘ f</kbd> | Toggle fullscreen

## Future Work

- Allow user to choose from either `hyper` or `super` as ⌘. This is an option that is supported cross-platform.
- Configurable option to keep the OSX and spacemacs clipboards separate
Binary file added contrib/osx/apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions contrib/osx/keybindings.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(when (equal system-type 'darwin)
;; Treat option as meta and command as super
(setq mac-option-key-is-meta t)
(setq mac-command-key-is-meta nil)
(setq mac-command-modifier 'super)
(setq mac-option-modifier 'meta)

;; Keybindings
(global-set-key (kbd "s-q") 'save-buffers-kill-terminal)
(global-set-key (kbd "s-v") 'yank)
(global-set-key (kbd "s-c") 'kill-ring-save)
(global-set-key (kbd "s-x") 'kill-region)
(global-set-key (kbd "s-w") 'kill-this-buffer)
(global-set-key (kbd "s-z") 'undo-tree-undo)
(global-set-key (kbd "s-s") 'save-buffer)
(global-set-key (kbd "s-Z") 'undo-tree-redo)
(global-set-key (kbd "C-s-f") 'toggle-frame-fullscreen))
Binary file added contrib/osx/osx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions core/dotspacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ it reaches the top or bottom of the screen.")
"If non nil pressing 'jk' in insert state, ido or helm will activate the
evil leader.")

(defvar dotspacemacs-persistent-server nil
"If non nil advises quit functions to keep server open when quitting.")

(defvar dotspacemacs-smartparens-strict-mode nil
"If non-nil smartparens-strict-mode will be enabled in programming modes.")

Expand Down
31 changes: 26 additions & 5 deletions core/spacemacs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
(require 'solarized)
(deftheme solarized-dark "The dark variant of the Solarized colour theme")
(deftheme solarized-light "The light variant of the Solarized colour theme"))
(t
(t
;; other themes
;; we assume that the package name is suffixed with `-theme'
;; if not we will handle the special themes as we get issues in the tracker.
Expand All @@ -96,7 +96,8 @@
;; banner
(switch-to-buffer (get-buffer-create "*spacemacs*"))
(let ((buffer-read-only nil))
(insert-file-contents (concat spacemacs-core-directory "banner.txt")))
(insert-file-contents (concat spacemacs-core-directory "banner.txt"))
(spacemacs/insert-buttons))
;; evil and evil-leader must be installed at the beginning of the boot sequence
(spacemacs/load-or-install-package 'evil t)
(spacemacs/load-or-install-package 'evil-leader t)
Expand Down Expand Up @@ -142,8 +143,8 @@ If LOG is non-nil a message is displayed in spacemacs-mode buffer."

(defun spacemacs/set-font (font size &optional options)
(let* ((fontstr (if options
(format "%s-%s:%s" font size options)
(format "%s-%s" font size))))
(format "%s-%s:%s" font size options)
(format "%s-%s" font size))))
(spacemacs/message (format "Set default font: %s" fontstr))
(add-to-list 'default-frame-alist (cons 'font fontstr))
(set-default-font fontstr)))
Expand Down Expand Up @@ -177,11 +178,31 @@ SPACEMACS-TITLE-LENGTH. New loading title is displayed by chunk
of size LOADING-DOTS-CHUNK-THRESHOLD."
(setq spacemacs-loading-counter (1+ spacemacs-loading-counter))
(if (>= spacemacs-loading-counter spacemacs-loading-dots-chunk-threshold)
(progn
(progn
(setq spacemacs-loading-counter 0)
(let ((i 0))
(while (< i spacemacs-loading-dots-chunk-size)
(setq spacemacs-loading-text (concat spacemacs-loading-text "."))
(setq i (1+ i))))
(spacemacs/replace-last-line-of-buffer spacemacs-loading-text)
(redisplay))))

(defun spacemacs/insert-buttons ()
(goto-char (point-max))
(insert " ")
(insert-button "Homepage" 'action
(lambda (b) (browse-url "https://github.com/syl20bnr/spacemacs"))
'follow-link t)
(insert " ")
(insert-button "Documentation" 'action
(lambda (b) (browse-url "https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.md"))
'follow-link t)
(insert " ")
(insert-button "Gitter Chat" 'action
(lambda (b) (browse-url "https://gitter.im/syl20bnr/spacemacs"))
'follow-link t)
(insert " ")
(insert-button "Messages Buffer" 'action (lambda (b) (switch-to-buffer "*Messages*")) 'follow-link t)
(insert " ")
(insert-button "Spacemacs Folder" 'action (lambda (b) (find-file user-emacs-directory)) 'follow-link t)
(insert "\n\n"))
2 changes: 2 additions & 0 deletions core/templates/.spacemacs.template
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
dotspacemacs-feature-toggle-leader-on-jk nil
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
dotspacemacs-smartparens-strict-mode nil
;; If non nil advises quit functions to keep server open when quitting.
dotspacemacs-persistent-server nil
;; The default package repository used if no explicit repository has been
;; specified with an installed package.
;; Not used for now.
Expand Down
Loading

0 comments on commit dd28c5b

Please sign in to comment.