MCPcopy
hub / github.com/victorporof/Sublime-HTMLPrettify / open_u_config_rc

Function open_u_config_rc

src/py/utils/window_utils.py:25–32  ·  view source on GitHub ↗

Opens the user's .jsbeautifyrc file for editing in a new tab

(window)

Source from the content-addressed store, hash-verified

23
24
25def open_u_config_rc(window):
26 """Opens the user's .jsbeautifyrc file for editing in a new tab"""
27 defaults = "{\n}"
28 old_jsbeautifyrc_path = join(get_root_dir(), '.jsbeautifyrc')
29 old_jsbeautifyrc = read_text_from_file(old_jsbeautifyrc_path, defaults)
30
31 file_path = join(get_user_dir(), '.jsbeautifyrc')
32 window.open_file(ensure_file(file_path, default_contents=old_jsbeautifyrc))
33
34
35def open_sublime_settings(window):

Callers 1

runMethod · 0.85

Calls 4

get_root_dirFunction · 0.85
read_text_from_fileFunction · 0.85
get_user_dirFunction · 0.85
ensure_fileFunction · 0.85

Tested by

no test coverage detected