Skip to content

Commit

Permalink
Update the README to have clearer keybindings and explanations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Lopez committed Dec 24, 2015
1 parent de8bf95 commit 8821bd0
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions README.md
Expand Up @@ -4,34 +4,34 @@ Performs conversions between different CSS units.

Conversions can be made forward and backward between the following units:

- cm
- em
- in
- mm
- pc
- %
- pt
- px
- rem

The base pixel size for conversions is 16px by default. This can be changed within the settings, or you can set the base pixel size at the end of the line you want to convert. E.g. `/24` at the end of a line sets the base pixel size to `24px` for that line only.
- `cm`
- `em`
- `in`
- `mm`
- `pc`
- `%`
- `pt`
- `px`
- `rem`

The base pixel size for conversions is `16px` by default. This can be changed within the settings, or you can set the base pixel size at the end of the line you want to convert. E.g. `/24` at the end of a line sets the base pixel size to `24px` for that line only.

## Default Keybindings

### Mac
- `ctrl-c e`: Convert pixels to ems
- `ctrl-c r`: Convert pixels to rems
- `ctrl-c c`: Open the conversion panel
- `ctrl-c` `e`: Convert pixels to `em`s
- `ctrl-c` `r`: Convert pixels to `rem`s
- `ctrl-c` `c`: Open the conversion panel

### Windows / Linux

- `alt-c e`: Convert pixels to ems
- `alt-c r`: Convert pixels to rems
- `alt-c c`: Open the conversion panel
- `alt-c` `e`: Convert pixels to `em`s
- `alt-c` `r`: Convert pixels to `rem`s
- `alt-c` `c`: Open the conversion panel

## Converting Lines

If no selections are made, the entire line will be selected and converted. You can convert a single line at once, or use multiple cursors to convert many lines at once.
If no selections are made, each line with a cursor will be selected and converted. You can convert a single line at once, or use multiple cursors to convert many lines at once.

![Converting One Line](https://raw.githubusercontent.com/sethlopezme/atom-css-unit-converter/master/resources/single-line.gif)

Expand All @@ -43,12 +43,12 @@ If a selection is made, conversions will be performed only within the bounds of

![Converting Selections](https://raw.githubusercontent.com/sethlopezme/atom-css-unit-converter/master/resources/selections.gif)

## Converting Lines and Selections
## Converting Lines and Selections Simultaneously

Converting lines and selections works the way you would expect and as described above.
If selections have been made and you also have cursors on other lines (outside the selection bounds), each line with a cursor is selected and all selections are then converted.

## Converter UI

Having keybindings for every conversion isn't very practical, so this package also provides a UI that allows you to convert between any of the units listed above. The UI allows you to define a custom pixel base for conversions, as well.

![Interactive Converter](https://raw.githubusercontent.com/sethlopezme/atom-css-unit-converter/master/resources/interactive-converter.png)
![Converter UI](https://raw.githubusercontent.com/sethlopezme/atom-css-unit-converter/master/resources/interactive-converter.png)

0 comments on commit 8821bd0

Please sign in to comment.