This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/windows-scripts/funcs.el
Lucius Hu 96008496d6 windows-scripts: replaced dos.el with bat-mode, added bmx-mode
- Replaced `dos.el` with `bat-mode`
  - `dos.el` is superseded by `bat-mode`
  - `dos.el` is localised package
  - `bat-mode` is a built-in mode
- Added `bmx-mode`
  - `bmx-mode` provided syntax highlighting, code-navigation and refactoring
    capabilities on top of `bat-mode`
2021-04-09 20:08:55 +00:00

24 lines
779 B
EmacsLisp

;;; funcs.el --- Windows-scripts Layer Functions File for Spacemacs
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun windows-scripts/bat-outline-setup ()
"Select position by mouse and return to `bat-mode'."
(local-set-key [mouse-1] (lambda () (interactive) (bat-mode) (beginning-of-line)))
(local-set-key [return] 'bat-mode))
;;;###autoload
(defun windows-scripts/bat-outline ()
"Navigate within Batch script using outline-mode."
(interactive)
(setq-local outline-regexp ":[^:]")
(outline-mode)
(hide-body)
(define-key evil-normal-state-local-map (kbd "SPC m z") 'bat-mode))