README.md 5.7 KB
Newer Older
1 2
# What is Lime?

F
Fredrik Ehnbom 已提交
3
I love the [Sublime Text](http://www.sublimetext.com) editor. [I have](https://github.com/quarnster/SublimeClang) [created](https://github.com/quarnster/SublimeJava) [several](https://github.com/quarnster/CompleteSharp) [plugins](https://github.com/quarnster/SublimeGDB) [to make](https://github.com/quarnster/ADBView) it even better. One thing that scares me though is that it is not open sourced and the [pace of nightly releases](http://www.sublimetext.com/nightly) have recently been anything but nightly, even now that version 3 is out in Beta.
4

J
jaseg 已提交
5
There was a period of about 6 months after the Sublime Text 2 “stable“ version was released where pretty much nothing at all was communicated to the users about what to expect in the future, nor was there much support offered in the forums. People including myself were wondering if the product was dead and I personally wondered what would happen to all the bugs, crashes and annoyances that still existed in ST2. This lack of communication is a dealbreaker to me and I decided that I will not spend any more money on that product because of it.
6

F
Fredrik Ehnbom 已提交
7
As none of the other text editors I've tried come close to the love I had for Sublime Text, I decided I had to create my own.
8

F
Fredrik Ehnbom 已提交
9 10
The frontend(s) are not ready to replace your favourite editor, but the backend itself I believe isn't too far away.

F
Fredrik Ehnbom 已提交
11 12
![Screenshot taken Oct 23 2013](http://i.imgur.com/VIpmjau.png)

F
Fredrik Ehnbom 已提交
13 14
# Goals

J
jaseg 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- ☑ 100% Open source
- ☑ Compatible with Textmate color schemes (which is what ST is using)
- ☑ Compatible with Textmate syntax definitions (which again is what ST is using)
- ☐ Compatible with Textmate snippets
- ☐ Compatible with Sublime Text’s python plugin API. I’ll probably never implement this 100%, only the api bits I need for the plugins I use.
- ☐ Compatible with Sublime Text’s keybindings and settings
- ☐ Compatible with Sublime Text snippets
- ☐ Sublime Text’s Goto anything panel
- ☑ Multiple cursors
- ☑ Regression tests (Programming in [Go](http://golang.org) makes it trivial and even fun to write them ;))
- ☐ Support for plugging in a custom parser for more advanced syntax highlighting.
- ☐ Terminal UI (*Maybe* I’ll work on a simple non-terminal UI at some point)
- ☐ Cross platform (It appears to be compiling and running on OSX and Linux last I tried, but needs further validation.)

# Why can’t I open up an issue?

Because I’m just a single person and I don’t want to offer up my spare time doing support or dealing with feature requests that I don’t care about myself. If you want a feature implemented or a bug fixed, fork it and implement it yourself and submit a pull request when you’re happy with the implementation.
F
Fredrik Ehnbom 已提交
32 33 34

# Build instructions

35 36 37 38
### Install required components
- Go 1.1
   - Follow the build instructions at [tip.golang.org](http://tip.golang.org/doc/install/source)
- Python3
F
Fredrik Ehnbom 已提交
39 40 41
   - Python 3 **must** be compiled without [sigaltstack enabled](https://code.google.com/p/go/issues/detail?id=5287).
   - ~~``` sudo apt-get install python3-dev ``` # On Linux~~
   - ~~``` brew install python3 ``` # On Mac~~
42 43 44 45 46 47 48
- Oniguruma
   - ``` sudo apt-get install libonig-dev ``` # On Linux
   - ``` brew install oniguruma ``` # On Mac
- qt5 (Optional)
   - Follow the instructions at [go-qt5](https://github.com/salviati/go-qt5)

### Download the needed repositories
F
Fredrik Ehnbom 已提交
49

50 51
```
go get code.google.com/p/log4go github.com/quarnster/parser github.com/quarnster/completion github.com/howeyc/fsnotify
S
Sascha Gehlich 已提交
52
git clone --recursive git@github.com:quarnster/lime.git $GOPATH/src/lime
53 54 55 56 57 58 59
```

### Modify cgo.go settings

``` open $GOPATH/src/lime/3rdparty/libs/gopy/lib/cgo.go ```

Example of ``` cgo.go ``` settings on my Mac
F
Fredrik Ehnbom 已提交
60 61

```
62
package py
N
Nikolaus Wittenstein 已提交
63

64 65 66 67
// #cgo CFLAGS: -I/usr/local/Cellar/python3/3.3.1/Frameworks/Python.framework/Versions/Current/include/python3.3m -I/usr/local/Cellar/python3/3.3.1/Frameworks/Python.framework/Versions/Current/include/python3.3m
// #cgo LDFLAGS: -L/usr/local/Cellar/python3/3.3.1/Frameworks/Python.framework/Versions/Current/lib/python3.3/config-3.3m -ldl -framework CoreFoundation -lpython3.3
// #cgo pkg-config: /usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/libffi.pc
import "C"
F
Fredrik Ehnbom 已提交
68
```
N
Nikolaus Wittenstein 已提交
69

70 71
### Compile completion

72
```
F
Fredrik Ehnbom 已提交
73
cd $GOPATH/src/github.com/quarnster/completion/build
74
make
75 76 77
```

### Compile lime
F
Fredrik Ehnbom 已提交
78

79 80
```
cd $GOPATH/src/lime/build
81 82 83 84
go run build.go
```

Done!
F
Fredrik Ehnbom 已提交
85

A
Andrea Pavoni 已提交
86
# To use termbox frontend
87

88
```
F
Fredrik Ehnbom 已提交
89 90
cd ../frontend/termbox
go run main.go
91 92
```

A
Andrea Pavoni 已提交
93
# To use qt5 frontend
F
Fredrik Ehnbom 已提交
94

95 96 97
```
cd ../frontend/qt5
go run main.go
F
Fredrik Ehnbom 已提交
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
```

# License

The license of the project is the 2-clause BSD license:

```
Copyright (c) 2013 Fredrik Ehnbom
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```