Sublime Forum

How to copy all view settings from on view to another?

#1
def copy_view_settings(source_view, destine_view):
    source_settings = source_view.settings()
    destine_settings = destine_view.settings()

    # print('BuildView setting syntax', source_syntax)
    source_syntax = source_settings.get('syntax')
    if source_syntax: destine_view.set_syntax_file(source_syntax)

    # And now?
0 Likes

#2

As far as I know, there is no way to enumerate a Settings object or get a list of its keys.

0 Likes

#3

I opened a issue on https://github.com/SublimeTextIssues/Core/issues/2916 asking for it.

0 Likes