Coder Social home page Coder Social logo

omni-scratch.el's Introduction

Omni-scratch.el

Scratch buffers one command away

https://travis-ci.org/AdrieanKhisbe/omni-scratch.el.svg https://coveralls.io/repos/AdrieanKhisbe/omni-scratch.el/badge.svg http://melpa.org/packages/omni-scratch-badge.svg http://stable.melpa.org/packages/omni-scratch-badge.svg https://img.shields.io/github/tag/AdrieanKhisbe/omni-scratch.el.svg http://img.shields.io/:license-gpl3-blue.svg

Description

The goal of this basic mode is to easily create scratch buffer to edit in the curreny major mode you are using.

Usage

Fonctionalities are limited for now to this:

  • you can create a scratch buffer with the current mode you are using omni-scratch-major. Calling it a second time from the scratch buffer will bring you back to the buffer you came from
  • you can create a scratch buffer attached to your current buffer with omni-scratch-buffer
  • you can create a new scratch buffer with omni-scratch. (Default to fundamental-mode, configurable with omni-scratch-default-mode)
  • you can go to the latest edited scratch with omni-scratch-goto-latest
  • you can quit a scratch buffer with omni-scratch-quit which will save its content to the kill ring
  • you can select a buffer from a list if helm is installed with omni-scratch-buffers
  • calling a scratch function with C-u, the universal arg, open the scratch buffer in other window

Inside a scratch buffer you have access to the following bindings:

  • M-s $ e : erase buffer
  • M-s $ e : write to file scratch
  • M-s $ p : paste content (using spacemacs paste transient mode if defined, otherwise simple yank)
  • M-s $ b : open a buffer list of the scratch buffers
  • M-s $ q : quit buffer, copying its content to kill ring

Installation

You can install it from melpa, or put the files in your load path, and require it.

If you use use-package you could use the following config

(use-package omni-scratch
    :bind (("M-s $ DEL" . omni-scratch)
           ("M-s $ -" . omni-scratch-major)
           ("M-s $ _" . omni-scratch-buffer)
           ("M-s $ $" . omni-scratch-goto-latest)
           ("M-s $ b" . omni-scratch-buffers)))

Customization

Here are the variable you can customize about omni-scratch:

  • omni-scratch-default-mode : the mode for the scratch buffer. By default fundamental-mode
  • omni-scratch-lighter: the lighter indicating a omni-scratch buffer. By default Ξ².
  • omni-scratch-pale-background: If true (default), scratch buffer are more pale than other buffers
  • omni-scratch-pale-percent: how pale are the scratch buffers.

About

This is still a prototype. So if ever you think about using it, prefer the master branch or elpa stable, and expect to update your config from times to times until stabilization.

Name of function and even behavior might change, so don’t be suprised. This will be reported in the Changelog.

If you have any remark, refactor suggestion or else, just pose an issue ;)

omni-scratch.el's People

Contributors

adrieankhisbe avatar

Stargazers

kostafey avatar Clemens Radermacher avatar Danylo Fedorov avatar D.K. avatar  avatar  avatar  avatar Michael Alan Dorman avatar

Watchers

James Cloos avatar  avatar

omni-scratch.el's Issues

Please add a prefix to test-helper.el to avoid conflicts with 68 other packages

There exist at least 69 packages that contain a file named test-helper.el that also provides the feature test-helper.

This leads to issues for users who have at least two of these packages installed. It is unlikely that such a user would be able to run the tests of all of those packages. If the primary test file of one of those packages does (require 'test-helper), then it is undefined which of the various test-helper.el files gets loaded. Which it is, depends on the order of the load-path.

To avoid this conflicts, you should rename your test-helper.el to <your-package>-test-helper.el and adjust the feature accordingly.

Also don't forget to update the require form in your primary test file and/or update references to the library/feature elsewhere. Also, if your primary test file is named something like test.el, then please consider renaming that too (same for any other utility elisp files your repositoroy may contain).

Thanks!

PS: This issue is a bit generic because I had to open 69 issues.

Open the scratch buffer in other window by default?

Normally, calling a scratch function with C-u, the universal arg, it will open the scratch buffer in other window, how I set it to open scratch buffer in other window (or new window if no other window) by default?

Variable, maybe?

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.