Пример #1
0
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
}