]> git.lizzy.rs Git - micro.git/blob - README.md
Update 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 [![Join the chat at https://gitter.im/zyedidia/micro](https://badges.gitter.im/zyedidia/micro.svg)](https://gitter.im/zyedidia/micro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6 [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/zyedidia/micro/blob/master/LICENSE)
7
8 > Micro is very much a work in progress
9
10 Micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the full capabilities
11 of modern terminals.
12
13 Here is a picture of micro editing its source code.
14
15 ![Screenshot](./screenshot.png)
16
17 # Features
18
19 * Easy to use
20 * Common keybindings (ctrl-s, ctrl-c, ctrl-v, ctrl-z...)
21 * Extremely good mouse support
22 * Cross platform
23 * Syntax highlighting (in over [75 languages](runtime/syntax)!)
24 * Colorscheme support
25 * True color support (set the `MICRO_TRUECOLOR` env variable to 1 to enable it)
26 * Search and replace
27 * Sane defaults
28 * Undo and redo
29 * Unicode support
30 * Copy and paste with the system clipboard
31 * Small and simple
32 * Configurable
33
34 If you'd like to see what has been implemented, and what I plan on implementing soon-ish, see the [todo list](todolist.md)
35
36 # Installation
37
38 ### Homebrew
39
40 If you are on Mac, you can install micro using Homebrew:
41
42 ```
43 brew tap zyedidia/micro
44 brew install --devel micro
45 ```
46
47 Micro is devel-only for now because there is no released version.
48
49 ### Prebuilt binaries
50 | Version | Mac | Linux 64 | Linux 32 | Linux Arm | Windows 64 | Windows 32 |
51 | ------- | --- |---|---|---|---|---|
52 | Nightly Binaries | [Mac OS X](http://zbyedidia.webfactional.com/micro/binaries/micro-osx.tar.gz) | [Linux 64](http://zbyedidia.webfactional.com/micro/binaries/micro-linux64.tar.gz) | [Linux 32](http://zbyedidia.webfactional.com/micro/binaries/micro-linux32.tar.gz) | [Linux Arm](http://zbyedidia.webfactional.com/micro/binaries/micro-linux-arm.tar.gz) | [Windows 64](http://zbyedidia.webfactional.com/micro/binaries/micro-win64.zip) | [Windows 32](http://zbyedidia.webfactional.com/micro/binaries/micro-win32.zip)
53
54 To run the micro binary just run `./bin/micro` (you may want to place the binary on your path for ease of use).
55
56 ### Building from source
57
58 Micro is made in Go so you must have Go installed on your system to build it.
59
60 Make sure that you have Go version 1.4 or greater.
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 If you don't have xclip or xsel, micro will use an internal clipboard for copy and paste, but it won't work with external applications.
77
78 # Usage
79
80 Once you have built the editor, simply start it by running `micro path/to/file.txt` or simply `micro` to open an empty buffer.
81
82 Micro also supports creating buffers from `stdin`:
83
84 ```
85 $ ifconfig | micro
86 ```
87
88 You can move the cursor around with the arrow keys and mouse.
89
90 You can also use the mouse to manipulate the text. Simply clicking and dragging will select text. You can also double click
91 to enable word selection, and triple click to enable line selection.
92
93 You can run `$ micro -version` to get the version number. Since there is no release, this just gives you the
94 commit hash. The version is unknown if you built with `go get`, instead use `make install` or `make` to get a binary
95 with a version number defined.
96
97 #### Help text
98
99 See the [help text](./runtime/help/help.md) for information about keybindings, editor commands, colorschemes and
100 configuration options.
101
102 # Configuration
103
104 Configuration directory:
105
106 Micro uses the `$XDG_CONFIG_HOME/micro` as the configuration directory. As per the XDG spec,
107 if `$XDG_CONFIG_HOME` is not set, `~/.config/micro` is used as the config directory.
108
109 At this point, there isn't much you can configure.
110 Micro has a few options which you can set:
111
112 * colorscheme
113 * tabsize
114 * syntax
115 * tabsToSpaces
116
117 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.
118
119 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.
120
121 The tabsToSpaces option is on or off. It specifies whether to use spaces instead of tabs or not. The default is off.
122
123 The colorscheme can be selected from all the files in the `~/.config/micro/colorschemes/` directory. Micro comes by default with three colorschemes:
124
125 * default: this is the default colorscheme.
126 * solarized: this is the solarized colorscheme (used in the screenshot). You should have the solarized color palette in your terminal to use it.
127 * 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.
128
129 These are embedded in the Go binary, but to see their source code, look [here](./runtime/colorschemes)
130
131 Any option you set in the editor will be saved to the file `~/.config/micro/settings.json` so, in effect, your configuration file will be created
132 for you. If you'd like to take your configuration with you to another machine, simply copy the `settings.json` to the other machine.
133
134 # Contributing
135
136 If you find any bugs, please report them! I am also happy to accept pull requests from anyone.