Giter VIP home page Giter VIP logo

window-numbering.el's Introduction

window-numbering

Numbered window shortcuts for Emacs

Build Status

Enable window-numbering-mode and use M-1 through M-0 to navigate.

If you want to affect the numbers, use window-numbering-before-hook or window-numbering-assign-func. For instance, to always assign the calculator window the number 9, add the following to your .emacs:

(setq window-numbering-assign-func
      (lambda () (when (equal (buffer-name) "*Calculator*") 9)))

window-numbering.el's People

Contributors

nschum avatar purcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

window-numbering.el's Issues

Is project active?

I wanted to make an enhancement to add functions to move buffers, swap buffers, by number. Is this still maintained, or would it be better if I fork? Or I could be added as a maintainer?

Setting window-numbering-assign-func to a function causes an error

Reproduction steps:

  1. start emacs: emacs -Q -L /path/to/window-numbering-directory/

  2. evaluate this scratch buffer:

(require 'window-numbering)

(defun my/window-numbers-assign ()
  (when (eq (buffer-name) "*scratch*")
    0))

(setq window-numbering-assign-func #'my/window-numbers-assign)
(setq window-numbering-auto-assign-0-to-minibuffer nil)
  1. turn on window-numbering-mode: M-x window-numbering-mode

  2. split window: C-x 2

result: window splitting is ok, but echo area shows error message: Symbol's value as variable is void: my/window-numbers-assign.

Strangely, there is no problem when using a lambda expression instead of a named function:

(setq window-numbering-assign-func
      (lambda ()
        (when (string= (buffer-name) "*scratch*")
          0)))

window-numbering across frames

I would like to have window-numbering number windows across frames, for instance:

  • when using emacs as a daemon
  • on frames created with make-frame

Is it already implemented ?

If not, would it be doable ? Any hints on how to implement such a thing would be gladly welcomed.

Trouble making this work...

I installed this without difficulty from melpa. I put this (after a little guessing that is what you mean by "enable window-numbering" and reading of the source) in my init.el

(require 'window-numbering)
(setq window-numbering-mode t)

I do C-x 3 to make side-by-side windows, then try M-2 to go to the second window, but I get "Wrong type argument, hash-table-p, nil." I use Edebug to instrument "select-window-by-number" and find out that "window-numbering-table," which began life as "nil," is still "nil." Not sure how to get this package to work.

Forked and extended window-numbering.el

Hi,

First of all thank you so much for this package that allowed Spacemacs to be what it is now, and made me discover a new awesome way of interacting with Emacs :)

I'm contacting you because you said that you are willing to pass on the development of window numbers for Emacs (#12), and I am very interested. I have already forked and made my own heavily modified version of your package, and will soon submit it on Melpa.

The forked project is available here: https://github.com/deb0ch/winum.el

Here is a list of my modifications / additions:

  • Number sets across multiple frames, giving a smoother experience of multi-screen Emacs (see #14).
  • 3 possible scopes: frame-local, visible frames or all frames
  • get-window-by-number public function, needed in Spacemacs and for future developments.
  • Unlimited window numbers
  • select-window-by-number can now be used interactively to select a window using prefix arg or read-from-minibuffer, allowing the selection of an unlimited number.
  • Ignore buffers by name
  • ;;;###autoload for all functions that should have public visibility
  • Improve customize integration
  • More detailed README.org
  • Improve docstrings
  • Simplify implementation for better readability
  • Rename to winum.el

In the very near future I would like to add more numbered functionalities:

  • More general window management: send / swap / bring / delete buffer to / from numbered window. Another Spacemacs contributor started writing it inside Spacemacs and I would like to ask him to contribute his work

If you are still willing to pass this on and judge my work to be of sufficient quality, would you be willing to state in your README and package description that my fork is the currently active version ?

I would also be very glad of having your thoughts and feedback if you had the time to take a look at the code.

Cheers ๐Ÿ˜ธ

How to change M-NUM to Command-NUM

I am sorry to bother you, but I hope to change M-NUM to Command-NUM, I don't know how to write in my personal.el. Thank you very much.

Can I switch to minibuffer?

Thanks to the window numbering2. I can switch to windows. But I cannot find way to go to minibuffer. Can I do that? Thanks

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.