Giter Site home page Giter Site logo

electric-spacing's Introduction

electric-spacing.el

空白の自動挿入

insert spaces automatically between user-defined patterns

Screencast

screencast.gif

Installation

Require this script

(require 'electric-spacing)

and you may enable electric-spacing-mode with M-x electric-spacing-mode. Loading the mode in major-mode-hooks may also be useful.

(add-hook 'org-mode-hook 'electric-spacing-mode)

Defining Patterns

You may define a pattern where whitespaces should be inserted, by adding a regexp-pair to electric-spacing-regexp-pairs. For example, following setting inserts spaces between Japanese and English characters like: foo ほげ bar ふが

(add-to-list 'electric-spacing-regexp-pairs
             '("\\cA\\|\\cC\\|\\ck\\|\\cK\\|\\cH" . "[0-9A-Za-z]"))
(add-to-list 'electric-spacing-regexp-pairs
             '("[0-9A-Za-z]" . "\\cA\\|\\cC\\|\\ck\\|\\cK\\|\\cH"))

You may define a buffer-local pattern by making electric-spacing-regexp-pairs buffer-local before registering the pattern.

(make-local-variable 'electric-spacing-regexp-pairs)

electric-spacing's People

Contributors

zk-phi-test avatar zk-phi avatar

Stargazers

Will B Chang avatar Gyubeom Im avatar ROCKTAKEY avatar Oleg Pykhalov avatar Xuan Bi avatar

Watchers

James Cloos avatar  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.