示例#1
0
文件: main.go 项目: BinaryPaean/lime
func (t *tbfe) ActiveView(w *backend.Window) *backend.View {
	if w == nil {
		return nil
	}
	if v := w.Views(); len(v) > 0 {
		return v[0]
	}
	return nil
}
示例#2
0
func createNewView(filename string, window *backend.Window) *backend.View {
	syntax := "../../3rdparty/bundles/go.tmbundle/Syntaxes/Go.tmLanguage"
	v := window.OpenFile(filename, 0)

	v.Settings().Set("trace", true)
	v.Settings().Set("syntax", syntax)

	return v
}