• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    Emacs Lisp
  • Created over 10 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Keep your text centered when there's only one window.

NOTE: Due to a lack of time to solve the issues of this project and the responsabilities derived from my recent paternity, I’m looking for someone to transfer the ownership of the project and who’s willing to keep working in it.

Centered Window Mode

Global minor mode that centers the text of the window. If another window is visible the text goes back to normal if its width is less than cwm-centered-window-width.

You may want to activate visual-line-mode if your lines go out of reach.

Screenshots

https://raw.githubusercontent.com/ikame/centered-window-mode/master/img/s-1.png https://raw.githubusercontent.com/ikame/centered-window-mode/master/img/s-2.png https://raw.githubusercontent.com/ikame/centered-window-mode/master/img/s-3.png

Installation

Manual installation

First, download centered-window-mode.el in your emacs load path.

Then, to make it available, add this to your configuration file:

(require 'centered-window-mode)

Installation via el-get

If you use el-get, the emacs package manager, simply add centered-window-mode to your packages list.

Installation via use-package

If you use use-package, simply add the following to your init file.

(use-package centered-window :ensure t)

Activation

On-the-fly

Simply type M-x centered-window-mode in any buffer.

Permanent

To make this permanent, add this to your emacs configuration file:

(require 'centered-window-mode)
(centered-window-mode t)

Vertical padding

Adding vertical padding to an Emacs window is kind of hard, I have tried a lot of different solutions but most of them add a lot of complexity and source of bugs to the mode. Currently there are the options cwm-use-vertical-padding (default nil, set to t if you want this feature) and cwm-frame-internal-border (default 70) to add some padding to the frame, it’s far from ideal but I have found it at most acceptable for most of the use cases where I need this feature.

Customization

Once installed you can easily customize the mode use Emacs’ customization mechanism: M-x customize-group<RET>centered-window-mode

License

Copyleft (ɔ) Anler Hernández Peral

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

More Repositories

1

minimal-theme

Minimal theme for Emacs 24
Emacs Lisp
79
star
2

progressbar

An utility module to represent progress in the form of a progress bar.
Python
78
star
3

white-theme.el

Minimalistic light color theme inspired by basic-theme
Emacs Lisp
27
star
4

bs-getenv

ReasonML/BuckleScript PPX for embedding env variables
Shell
25
star
5

.emacs.d-literate

Personal Emacs config files described using a literate-programming style.
Emacs Lisp
23
star
6

working-with-unix-processes-book-examples

Examples and source code from the book Working with Unix processes
Python
19
star
7

django-dev-commands

Useful commands for developing Django applications.
Python
12
star
8

django-test-client-extensions

Extensions to Django's built-in test client.
Python
11
star
9

django-blackhole

Django application that let's you work in your templates apart from having or not the corresponding views created
Python
9
star
10

Rockefeller

Library for dealing with money and currency conversion in Python
Python
8
star
11

Git-Django-Fabric-Deploy

fabfile.py I use to deploy my django sites
6
star
12

App-Engine-runserver.py

Safe defaults for working with google's app engine dev_appserver.py script.
Python
6
star
13

http-sink

Simple http-sink server with logging
Haskell
6
star
14

remember-last-theme

Remember the last used theme between Emacs' sessions.
Emacs Lisp
6
star
15

Working-with-TCP-Sockets-book-examples

Examples in Ruby, Python and C of the book: "Working with TCP Sockets" from Jesse Storimer
C
5
star
16

automaton

Generator of state machines that accept the same language of a given regular expression using derivatives method.
Python
5
star
17

GAE-Webapp2-Boilerplate

Boilerplate application for Google App Engine using the Webapp2 web framework.
JavaScript
4
star
18

Cpanel

Control Panel for Cakephp
PHP
4
star
19

dotfiles

There’s no place like ~
Shell
4
star
20

Alfred-Pythonista

Run python code inside Alfred
4
star
21

gae-cookbook

Development repository for Floqq's Google App Engine chef recipe
Ruby
4
star
22

emacs-shortway

Si nunca has utilizado Emacs puedes empezar siguiendo esta pequeña guía
3
star
23

Django-mysql-utils

Some tweaks to improve speed in MySQL databases.
Python
3
star
24

automatonweb

CSS
3
star
25

HTML-Ipsum-Alfred-plugin

Dummy text generator plugin for Alfred app.
Python
3
star
26

getrusage

Get information about resource utilization. Executable for GETRUSAGE (3P).
Rust
3
star
27

pants-python-tpl

Shell
3
star
28

python.vim

Python syntax file for vim.
Vim Script
2
star
29

talks

Code examples of my talks
Haskell
2
star
30

implicits

Implicit function parameters in Clojure
Clojure
2
star
31

simple-wsgi-application-layout

Python
2
star
32

Fancy-Unittest

Extension of python's built-in unittest module to colorize test output
Python
2
star
33

elm-music-player-simple-and-ugly

Elm
2
star
34

elm-music-player

Repositorio para el taller: Crear un reproductor de música con Elm
JavaScript
2
star
35

sqlalchemy-mutable-example

Python
1
star
36

anler.me-hakyll

Source code of my personal home page.
CSS
1
star
37

mdblog

Super simple static-blog generator
Python
1
star
38

lein-test

Clojure
1
star
39

xkcd-fan

Fetchs a random comic from xkcd's website
Python
1
star
40

scratch-rn-navigation

TypeScript
1
star
41

boiler-webapp2

Google App Engine webapp2 boilerplate codebase
Python
1
star
42

emacs

Personal Emacs configuration
Emacs Lisp
1
star
43

recycle

Clojure library designed to manage application state heavily inspired by stuartsierra's component.
Clojure
1
star
44

learning-by-trolling

Slides de la charla "Learning by Trolling" - PyConEs 2015
1
star
45

gaeutils

Utilities for using gae and django
Python
1
star
46

enc

Encode in a variety of encodings without leaving the command line.
Haskell
1
star
47

Alfred-pure-Lion-theme

Alfred app theme
1
star