Exemplo n.º 1
0
def do_sync_active_view(view):
	fn = view.file_name()
	if fn:
		gs.set_attr('last_active_fn', fn)
		if fn.lower().endswith('.go'):
			gs.set_attr('last_active_go_fn', fn)

	if gs.is_pkg_view(view):
		m = {}
		psettings = view.settings().get('GoSublime')
		if psettings and gs.is_a(psettings, {}):
			m = gs.mirror_settings(psettings)
		gs.set_attr('last_active_project_settings', gs.dval(m, {}))
Exemplo n.º 2
0
def do_sync_active_view(view):
	fn = view.file_name() or ''
	gs.set_attr('active_fn', fn)

	if fn:
		gs.set_attr('last_active_fn', fn)
		if fn.lower().endswith('.go'):
			gs.set_attr('last_active_go_fn', fn)

	if gs.is_pkg_view(view):
		m = {}
		psettings = view.settings().get('GoSublime')
		if psettings and gs.is_a(psettings, {}):
			m = gs.mirror_settings(psettings)
		gs.set_attr('last_active_project_settings', gs.dval(m, {}))
Exemplo n.º 3
0
def do_sync_active_view(view):
    fn = view.file_name() or ''
    gs.set_attr('active_fn', fn)

    if fn:
        gs.set_attr('last_active_fn', fn)
        if fn.lower().endswith('.go'):
            gs.set_attr('last_active_go_fn', fn)

    win = view.window()
    if win is not None and view in win.views():
        m = {}
        psettings = view.settings().get('GoSublime')
        if psettings and gs.is_a(psettings, {}):
            m = gs.mirror_settings(psettings)
        gs.set_attr('last_active_project_settings', gs.dval(m, {}))
Exemplo n.º 4
0
def do_sync_active_view(view):
	fn = view.file_name() or ''
	gs.set_attr('active_fn', fn)

	if fn:
		gs.set_attr('last_active_fn', fn)
		if fn.lower().endswith('.go'):
			gs.set_attr('last_active_go_fn', fn)

	win = view.window()
	if win is not None and view in win.views():
		m = {}
		psettings = view.settings().get('GoSublime')
		if psettings and gs.is_a(psettings, {}):
			psettings['env']['GOPATH'] = expand_template(psettings['env']['GOPATH'])
			m = gs.mirror_settings(psettings)
		gs.set_attr('last_active_project_settings', gs.dval(m, {}))