]> git.lizzy.rs Git - micro.git/blob - README.md
a4ca9ce84de20063b81416c6e5de9cdd275c9115
[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 Once you have downloaded the file, you can install the runtime files by running `./install.sh`
57 in the directory you downloaded. This will place all the runtime files in `~/.micro`.
58
59 To run the micro binary just run `./bin/micro` (you may want to place the binary on your path for ease of use).
60
61 ### Building from source
62
63 Micro is made in Go so you must have Go installed on your system to build it, and make sure your `GOPATH` is set.
64
65 ```
66 $ git clone https://github.com/zyedidia/micro
67 $ cd micro
68 $ make
69 ```
70
71 This will build micro and put the binary in the current directory. It will also install syntax highlighting files to `~/.micro/syntax`.
72
73 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).
74
75 # Usage
76
77 Once you have built the editor, simply start it by running `micro path/to/file.txt` or simply `micro` to open an empty buffer.
78
79 Micro also supports creating buffers from `stdin`:
80
81 ```
82 $ ifconfig | micro
83 ```
84
85 You can move the cursor around with the arrow keys and mouse.
86
87 #### Keybindings
88
89 * Ctrl-q:   Quit
90 * Ctrl-s:   Save
91 * Ctrl-o:   Open file
92 * Ctrl-z:   Undo
93 * Ctrl-y:   Redo
94 * Ctrl-f:   Find
95 * Ctrl-n:   Find next
96 * Ctrl-p:   Find previous
97 * Ctrl-a:   Select all
98 * Ctrl-c:   Copy
99 * Ctrl-x:   Cut
100 * Ctrl-v:   Paste
101 * Ctrl-h:   Open help
102 * Ctrl-u:   Half page up
103 * Ctrl-d:   Half page down
104 * PageUp:   Page up
105 * PageDown: Page down
106 * Ctrl-e:   Execute a command
107
108 You can also use the mouse to manipulate the text. Simply clicking and dragging will select text. You can also double click
109 to enable word selection, and triple click to enable line selection.
110
111 # Configuration
112
113 At this point, there isn't much you can configure.
114 Micro has a few options which you can set:
115
116 * colorscheme
117 * tabsize
118 * syntax
119
120 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`.
121
122 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
123 for you. If you'd like to take your configuration with you to another machine, simply copy the `settings.json` to the other machine.
124
125 # Contributing
126
127 If you find any bugs, please report them! I am also happy to accept pull requests from anyone.