]> git.lizzy.rs Git - micro.git/blob - README.md
3c44c2aeecee92011cb6f739ffeb1254bf2f3d93
[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 terminal-based 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 * Copy and paste with the system clipboard
29 * Small and simple
30 * Configurable
31
32 If you'd like to see what has been implemented, and what I plan on implementing soon-ish, see the [todo list](todolist.md)
33
34 # Installation
35
36 ### Homebrew
37
38 If you are on Mac, you can install micro using Homebrew:
39
40 ```
41 brew tap zyedidia/micro
42 brew install --devel micro
43 ```
44
45 Micro is devel-only for now because there is no released version.
46
47 ### Prebuilt binaries
48
49 | Download |
50 | --- |
51 | [Mac OS X](http://zbyedidia.webfactional.com/micro/binaries/micro-osx.tar.gz) |
52 | [64 bit Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux64.tar.gz) |
53 | [32 bit Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux32.tar.gz) |
54 | [Arm Linux](http://zbyedidia.webfactional.com/micro/binaries/micro-linux-arm.tar.gz) |
55
56 To run the micro binary just run `./bin/micro` (you may want to place the binary on your path for ease of use).
57
58 ### Building from source
59
60 Micro is made in Go so you must have Go installed on your system to build it.
61
62 You can simply `go get` it.
63
64 ```
65 go get -u github.com/zyedidia/micro/cmd/micro
66 ```
67
68 ### Clipboard support
69
70 On Linux, clipboard support requires 'xclip' or 'xsel' command to be installed. For Ubuntu:
71
72 ```
73 $ sudo apt-get install xclip
74 ```
75
76 # Usage
77
78 Once you have built the editor, simply start it by running `micro path/to/file.txt` or simply `micro` to open an empty buffer.
79
80 Micro also supports creating buffers from `stdin`:
81
82 ```
83 $ ifconfig | micro
84 ```
85
86 You can move the cursor around with the arrow keys and mouse.
87
88 #### Keybindings
89
90 * Ctrl-q:   Quit
91 * Ctrl-s:   Save
92 * Ctrl-o:   Open file
93 * Ctrl-z:   Undo
94 * Ctrl-y:   Redo
95 * Ctrl-f:   Find
96 * Ctrl-n:   Find next
97 * Ctrl-p:   Find previous
98 * Ctrl-a:   Select all
99 * Ctrl-c:   Copy
100 * Ctrl-x:   Cut
101 * Ctrl-v:   Paste
102 * Ctrl-h:   Open help
103 * Ctrl-u:   Half page up
104 * Ctrl-d:   Half page down
105 * PageUp:   Page up
106 * PageDown: Page down
107 * Ctrl-e:   Execute a command
108
109 You can also use the mouse to manipulate the text. Simply clicking and dragging will select text. You can also double click
110 to enable word selection, and triple click to enable line selection.
111
112 # Configuration
113
114 Configuration directory:
115
116 Micro uses the `$XDG_CONFIG_HOME/micro` as the configuration directory. As per the XDG spec,
117 if `$XDG_CONFIG_HOME` is not set, `~/.config/micro` is used as the config directory.
118
119 At this point, there isn't much you can configure.
120 Micro has a few options which you can set:
121
122 * colorscheme
123 * tabsize
124 * syntax
125 * tabsToSpaces
126
127 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`. The default is 4.
128
129 The syntax option can simply be on or off, so for example to turn syntax highlighting off, run `set syntax off`. The default is on.
130
131 The tabsToSpaces option is on or off. It specifies whether to use spaces instead of tabs or not. The default is off.
132
133 The colorscheme can be selected from all the files in the `ConfigDir/colorschemes/` directory. Micro comes by default with three colorschemes:
134
135 * default: this is the default colorscheme.
136 * solarized: this is the solarized colorscheme (used in the screenshot). You should have the solarized color palette in your terminal to use it.
137 * solarized-tc: this is the solarized colorscheme for true color, just make sure your terminal supports true color before using it and that the `MICRO_TRUECOLOR` environment variable is set to 1 before starting micro.
138
139 These are embedded in the Go binary, but to see their source code, look [here](./runtime/colorschemes)
140
141 Any option you set in the editor will be saved to the file `ConfigDir/settings.json` so, in effect, your configuration file will be created
142 for you. If you'd like to take your configuration with you to another machine, simply copy the `settings.json` to the other machine.
143
144 # Contributing
145
146 If you find any bugs, please report them! I am also happy to accept pull requests from anyone.