Skip to content

Commit

Permalink
Some readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Malabarba committed Oct 26, 2015
1 parent eab623c commit a08cce1
Showing 1 changed file with 63 additions and 61 deletions.
124 changes: 63 additions & 61 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#+TITLE: Smart-mode-line [[http://melpa.org/#/smart-mode-line][[[http://melpa.org/packages/smart-mode-line-badge.svg]]]] [[http://melpa.org/#/smart-mode-line][[[http://stable.melpa.org/packages/smart-mode-line-badge.svg]]]]
#+TITLE: Smart-mode-line [[http://melpa.org/#/smart-mode-line][file:http://melpa.org/packages/smart-mode-line-badge.svg]] [[http://melpa.org/#/smart-mode-line][file:http://stable.melpa.org/packages/smart-mode-line-badge.svg]]

[[https://gratipay.com/Malabarba/][Contribute]]

Expand All @@ -8,22 +8,22 @@ and /smart truncation/.

* Images

*Dark Theme*
*Dark Theme*\\
[[https://raw.github.com/Malabarba/smart-mode-line/master/screenshot-2013-11-11-dark.png]]

*Light Theme*
*Light Theme*\\
[[https://raw.github.com/Malabarba/smart-mode-line/master/screenshot-2013-11-11-light.png]]

*Powerline Theme*
*Powerline Theme*\\
[[https://raw.github.com/Malabarba/smart-mode-line/master/screenshot-powerline-theme.png]]

(Note: to use the powerline theme, install the
=smart-mode-line-powerline-theme= package from MELPA)

*Solarized Dark Theme*
*Solarized Dark Theme*\\
[[https://cloud.githubusercontent.com/assets/601365/7131638/34a3b0f8-e247-11e4-8fd5-811365167d22.png]]

*Solarized Light Theme*
*Solarized Light Theme*\\
[[https://cloud.githubusercontent.com/assets/601365/7131637/34946ac6-e247-11e4-8e0e-35a47df70686.png]]

(Note: to use the Solarized themes, install the
Expand Down Expand Up @@ -72,92 +72,92 @@ of the following BEFORE =sml/setup=:

Its main features include:

1. *Color coded*:
Highlights the most important information for you
(buffer name, modified state, line number). Don't
like the colors? See item /5./!

2. *Fixed width* (if you want):
Lets you set a maxium width for the path name and mode names, and
truncates them intelligently (truncates the directory, not the
buffer name). Also let's you *right indent* strings in the
mode-line (see =sml/mode-width=).

3. *Directory as Prefixes*:
Prefix feature saves a LOT of space. e.g. *"~/.emacs.d/"*
is translated to *":ED:"* in the path (open a file inside
this folder to see it in action). Long path names you
are commmonly working on are displayed as short
abbreviations. Set your own prefixes to make best use
of it (by configuring =sml/replacer-regexp-list=). Mousing
over the abbreviated path will show you the full
path. See below for examples.

4. *Hide or Highlight minor-modes*:
The [[https://github.com/Malabarba/rich-minority][rich-minority]]
package saves even more space. Select which minor modes you don't
want to see listed by adding them to the variable
=rm-excluded-modes=, or even highlight the modes that are more
important with the variable =rm-text-properties=. This will filter
out the modes you don't care about and unclutter the modes list
(mousing over the modes list still shows the full list).

5. *Very easy to configure*:
All colors and variables are customizable. You can change the
whole theme with =sml/apply-theme=, or just customize anything
manually with =sml/customize= and =sml/customize-faces=. There are
/DOZENS/ of variables to customize your mode-line, just pop over
there and have a look!

6. *Compatible with absolutely anything*:
I'm serious. Versions 2.0 and above should be compatible with
*any* other packages that display information in the mode-line
(evil, nyan-mode, elscreen, display-battery-mode, etc). If you
find /ANYTHING/ that does not appear as it should, file a bug report
and I'll get to it.
- Color coded ::
Highlights the most important information for you
(buffer name, modified state, line number). Don't
like the colors? See item /5./!

- Fixed width (if you want) ::
Lets you set a maxium width for the path name and mode names, and
truncates them intelligently (truncates the directory, not the
buffer name). Also let's you *right indent* strings in the
mode-line (see =sml/mode-width=).

- Directory as Prefixes ::
Prefix feature saves a LOT of space. e.g. =~/.emacs.d/=
is translated to =:ED:= in the path (open a file inside
this folder to see it in action). Long path names you
are commmonly working on are displayed as short
abbreviations. Set your own prefixes to make best use
of it (by configuring =sml/replacer-regexp-list=). Mousing
over the abbreviated path will show you the full
path. See below for examples.

- Hide or Highlight minor-modes ::
The [[https://github.com/Malabarba/rich-minority][rich-minority]]
package saves even more space. Select which minor modes you don't
want to see listed by adding them to the variable
=rm-excluded-modes=, or even highlight the modes that are more
important with the variable =rm-text-properties=. This will filter
out the modes you don't care about and unclutter the modes list
(mousing over the modes list still shows the full list).

- Very easy to configure ::
All colors and variables are customizable. You can change the
whole theme with =sml/apply-theme=, or just customize anything
manually with =sml/customize= and =sml/customize-faces=. There are
/DOZENS/ of variables to customize your mode-line, just pop over
there and have a look!

- Compatible with absolutely anything ::
I'm serious. Versions 2.0 and above should be compatible with
*any* other packages that display information in the mode-line
(evil, nyan-mode, elscreen, display-battery-mode, etc). If you
find /ANYTHING/ that does not appear as it should, file a bug report
and I'll get to it.

* Important Variables:

All variables can be edited by running =sml/customize=, and the
documentations are mostly self explanatory, I list here only the
most important ones.

1. =sml/theme=
1. =sml/theme=\\
Choose what theme you want to use for the mode-line colors. For now
there are 3 different themes: =dark=, =light=, and =respectful=.

2. =sml/shorten-directory= and =sml/shorten-modes=
2. =sml/shorten-directory= and =sml/shorten-modes=\\
Setting both of these to =t= garantees a fixed width mode-line
(directory name and minor-modes list will be truncated to fit). To
actually define the width, see below.

3. =sml/name-width= and =sml/mode-width=
3. =sml/name-width= and =sml/mode-width=\\
Customize these according to the width of your emacs frame. I set
them to =40= and =full= respectively, and the mode-line fits
perfectly when the frame is split in two even on my laptop's small
17" monitor. =full= means everything after the minor-modes will be
right-indented.

4. =sml/replacer-regexp-list=
4. =sml/replacer-regexp-list=\\
This variable is a list of (REGEXP REPLACEMENT) that is used
to parse the path. The replacements are applied
sequentially. This allows you to greatly abbreviate the path
that's shown in the mode-line. If this abbreviation is of
the form *":SOMETHING:"*, it is considered a prefix and get's
the form =:SOMETHING:=, it is considered a prefix and get's
a different color (you can change what's considered a prefix
by customizing =sml/prefix-regexp=).
For example, if you do a lot of work on a folder called
*"~/Dropbox/Projects/In-Development/"* almost half the
=~/Dropbox/Projects/In-Development/= almost half the
mode-line would be occupied just by the folder name, which
is much less important than the buffer name. But, you can't
just hide the folder name, since editting a file in
*"~/Dropbox/Projects/In-Development/Source"* is VERY different
from editting a file in *"~/Dropbox/Projects/Source"*. By
=~/Dropbox/Projects/In-Development/Source= is VERY different
from editting a file in =~/Dropbox/Projects/Source=. By
setting up a prefix for your commonly used folders, you get
all that information without wasting all that space. In this
example you could set the replacement to *":ProjDev:"* or just
*":InDev:"*, so the path shown in the mode-line will be
*":ProjDev:Source/"* (saves a lot of space without hiding
example you could set the replacement to =:ProjDev:= or just
=:InDev:=, so the path shown in the mode-line will be
=:ProjDev:Source/= (saves a lot of space without hiding
information).

Some abbreviations are defined out of the box, for instance /(see the
Expand Down Expand Up @@ -209,4 +209,6 @@ the project is in the =~/Projects= directory:

* Contributing

[[https://gratipay.com/Malabarba][[[https://cdn.rawgit.com/gratipay/gratipay-badge/2.1.3/dist/gratipay.png]]]]
[[https://gratipay.com/Malabarba][file:https://cdn.rawgit.com/gratipay/gratipay-badge/2.1.3/dist/gratipay.png]]


0 comments on commit a08cce1

Please sign in to comment.