{"id":18980884,"url":"https://github.com/sublimetext/modelines","last_synced_at":"2025-04-19T19:29:00.774Z","repository":{"id":66974245,"uuid":"1525337","full_name":"SublimeText/Modelines","owner":"SublimeText","description":"Vim-like modelines for Sublime Text.","archived":false,"fork":false,"pushed_at":"2012-09-13T23:30:45.000Z","size":207,"stargazers_count":21,"open_issues_count":2,"forks_count":9,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T12:11:50.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SublimeText.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-03-25T12:11:12.000Z","updated_at":"2024-08-13T06:08:53.000Z","dependencies_parsed_at":"2023-02-20T15:45:46.040Z","dependency_job_id":null,"html_url":"https://github.com/SublimeText/Modelines","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FModelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FModelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FModelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FModelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SublimeText","download_url":"https://codeload.github.com/SublimeText/Modelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249239353,"owners_count":21235853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T16:08:06.384Z","updated_at":"2025-04-16T12:31:15.790Z","avatar_url":"https://github.com/SublimeText.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sublime Modelines\r\n=================\r\n\r\nSet settings local to a single buffer. A more granular approach to settings\r\nthan the per file type ``.sublime-settings`` files.\r\n\r\nInspired in Vim's modelines feature.\r\n\r\nGetting Started\r\n***************\r\n\r\nDownload and install `SublimeModelines`_.\r\n\r\nSee the `installation instructions`_ for ``.sublime-package``\\ s.\r\n\r\n.. _installation instructions: http://sublimetext.info/docs/en/extensibility/packages.html#installation-of-packages\r\n.. _SublimeModelines: https://bitbucket.org/guillermooo/sublimemodelines/downloads/SublimeModelines.sublime-package\r\n\r\nSide Effects\r\n************\r\n\r\nBuffers will be scanned ``.on_load()`` for modelines and settings will be set\r\naccordingly. Settings will apply **only** to the buffer declaring them.\r\n\r\n.. **Note**: Application- and Window-level options declared in modelines are\r\n.. obviously global.\r\n\r\nUsage\r\n*****\r\n\r\nHow to Declare Modelines\r\n------------------------\r\n\r\nModelines must be declared at the top or the bottom of source code files with\r\none of the following syntaxes::\r\n\r\n    # sublime: option_name value\r\n    # sublime: option_name value; another_option value; third_option value\r\n\r\n**Note**: ``#`` is the default comment character. Use the corresponding\r\nsingle-line comment character for your language. When there isn't a concept of\r\ncomment, the default comment character must be used.\r\n\r\nHow to Define Comment Characters in Sublime Text\r\n------------------------------------------------\r\n\r\nSublimeModelines finds the appropriate single-line comment character by inspecting\r\nthe ``shellVariables`` preference, which must be defined in a ``.tmPreferences``\r\nfile. To see an example of how this is done, open ``Packages/Python/Miscellaneous.tmPreferences``.\r\n\r\nMany packages giving support for programming languages already include this, but\r\nyou might need to create a ``.tmPreferences`` file for the language you're working\r\nwith if you want SublimeModelines to be available.\r\n\r\n\r\nCaveats\r\n*******\r\n\r\nIf the option's value contains a semicolon (``;``), make sure it isn't followed\r\nby a blank space. Otherwise it will be interpreted as a multioption separator.\r\n\r\n\r\nNon-Standard Options\r\n********************\r\n\r\nFor some common cases, no directly settable option exists (for example, a\r\nsetting to specify a syntax). For such cases, Sublime Modelines provides\r\nnon-standard accessors as a stop-gap solution.\r\n\r\n**x_syntax** *Packages/Foo/Foo.tmLanguage*\r\n\r\nSets the syntax to the specified *.tmLanguage* file.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsublimetext%2Fmodelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsublimetext%2Fmodelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsublimetext%2Fmodelines/lists"}