]> git.lizzy.rs Git - micro.git/blob - README.md
Add install instructions for brew to readme
[micro.git] / README.md
1 # Micro
2
3 [![Build Status](https://travis-ci.org/zyedidia/micro.svg?branch=master)](https://travis-ci.org/zyedidia/micro)
4 [![Go Report Card](http://goreportcard.com/badge/zyedidia/micro)](http://goreportcard.com/report/zyedidia/micro)
5 [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/zyedidia/micro/blob/master/LICENSE)
6
7 > Micro is very much a work in progress
8
9 Micro is a command line text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities
10 of modern terminals.
11
12 Here is a picture of micro editing its source code.
13
14 ![Screenshot](./screenshot.png)
15
16 # Features
17
18 * Easy to use
19 * Common keybindings (ctrl-s, ctrl-c, ctrl-v, ctrl-z...)
20 * Extremely good mouse support
21 * Cross platform
22 * Syntax highlighting (in over [75 languages](runtime/syntax)!)
23 * Colorscheme support
24 * True color support (set the `MICRO_TRUECOLOR` env variable to 1 to enable it)
25 * Search and replace
26 * Undo and redo
27 * Unicode support
28 * Small and simple
29 * Configurable
30
31 If you'd like to see what has been implemented, and what I plan on implementing soon-ish, see the [todo list](todolist.md)
32
33 # Installation
34
35 ### Homebrew
36
37 If you are on Mac, you can install micro using Homebrew:
38
39 ```
40 brew tap zyedidia/micro
41 brew install --devel micro
42 ```
43
44 Micro is devel-only for now because there is no released version.
45
46 ### Prebuilt binaries
47
48 | Download |
49 | --- |
50 | [Mac OS X](http://zbyedidia.webfactional.com/micro/binaries/micro-osx.tar.gz) |
51 | [64 bit Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux64.tar.gz) |
52 | [32 bit Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux32.tar.gz) |
53 | [Arm Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux-arm.tar.gz) |
54
55 Once you have downloaded the file, you can install the runtime files by running `./install.sh`
56 in the directory you downloaded. This will place all the runtime files in `~/.micro`.
57
58 To run the micro binary just run `./bin/micro` (you may want to place the binary on your path for ease of use).
59
60 ### Building from source
61
62 Micro is made in Go so you must have Go installed on your system to build it, and make sure your `GOPATH` is set.
63
64 ```
65 $ git clone https://github.com/zyedidia/micro
66 $ cd micro
67 $ make
68 ```
69
70 This will build micro and put the binary in the current directory. It will also install syntax highlighting files to `~/.micro/syntax`.
71
72 Alternatively you can use `make install` instead of `make` if you want the binary to be added to you `GOBIN` (make sure that it is set).
73
74 # Usage
75
76 Once you have built the editor, simply start it by running `micro path/to/file.txt` or simply `micro` to open an empty buffer.
77
78 Micro also supports creating buffers from `stdin`:
79
80 ```
81 $ ifconfig | micro
82 ```
83
84 You can move the cursor around with the arrow keys and mouse.
85
86 #### Keybindings
87
88 * Ctrl-q:   Quit
89 * Ctrl-s:   Save
90 * Ctrl-o:   Open file
91 * Ctrl-z:   Undo
92 * Ctrl-y:   Redo
93 * Ctrl-f:   Find
94 * Ctrl-n:   Find next
95 * Ctrl-p:   Find previous
96 * Ctrl-a:   Select all
97 * Ctrl-c:   Copy
98 * Ctrl-x:   Cut
99 * Ctrl-v:   Paste
100 * Ctrl-h:   Open help
101 * Ctrl-u:   Half page up
102 * Ctrl-d:   Half page down
103 * PageUp:   Page up
104 * PageDown: Page down
105 * Ctrl-e:   Execute a command
106
107 You can also use the mouse to manipulate the text. Simply clicking and dragging will select text. You can also double click
108 to enable word selection, and triple click to enable line selection.
109
110 # Configuration
111
112 At this point, there isn't much you can configure.
113 Micro has a few options which you can set:
114
115 * colorscheme
116 * tabsize
117 * syntax
118
119 To set an option run Ctrl-e to execute a command, and type `set option value`, so to set the tabsize to 8 it would be `set tabsize 8`.
120
121 Any option you set in the editor will be saved to the file `~/.micro/settings.json` so, in effect, your configuration file will be created
122 for you. If you'd like to take your configuration with you to another machine, simply copy the `settings.json` to the other machine.
123
124 # Contributing
125
126 If you find any bugs, please report them! I am also happy to accept pull requests from anyone.