{"id":13442399,"url":"https://github.com/vim-python/python-syntax","last_synced_at":"2025-03-20T13:33:32.081Z","repository":{"id":17543058,"uuid":"82203847","full_name":"vim-python/python-syntax","owner":"vim-python","description":"Python syntax highlighting for Vim","archived":false,"fork":false,"pushed_at":"2023-10-19T10:01:49.000Z","size":194,"stargazers_count":436,"open_issues_count":38,"forks_count":82,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-28T05:13:18.706Z","etag":null,"topics":["highlighting","python","syntax","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim script","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/vim-python.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2017-02-16T16:53:05.000Z","updated_at":"2024-10-26T02:43:46.000Z","dependencies_parsed_at":"2024-02-26T19:58:56.735Z","dependency_job_id":null,"html_url":"https://github.com/vim-python/python-syntax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-python%2Fpython-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-python%2Fpython-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-python%2Fpython-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-python%2Fpython-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-python","download_url":"https://codeload.github.com/vim-python/python-syntax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244619317,"owners_count":20482397,"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":["highlighting","python","syntax","vim"],"created_at":"2024-07-31T03:01:45.261Z","updated_at":"2025-03-20T13:33:31.555Z","avatar_url":"https://github.com/vim-python.png","language":"Vim script","readme":"Python syntax highlighting for Vim\n=========================================\n\nThis is an enhanced version of the original Vim 6.1 Python syntax highlighting\n`python.vim` by Neil Schemenauer.\n\nFeatures\n--------\n\n* Enhanced highlighting for:\n  * Strings\n  * Special symbols inside strings\n  * Numeric constants\n* Added support for:\n  * Python 3\n  * Numbers with underscores\n  * String %-formatting and f-strings\n  * Magic comments: source code encoding and shebangs\n  * New exceptions and builtins\n  * Doctests\n  * `@decorator` syntax\n  * Class variables such as `self`, `cls`, and `mcs`\n  * Operators\n* Highlighting of the following errors:\n  * Invalid symbols in source file\n  * Invalid numeric constants\n  * Invalid %-formatting inside strings\n  * Invalid variable names\n  * Invalid operators\n  * Mixing spaces and tabs\n  * Trailing spaces (Enabled with `g:python_highlight_space_errors`)\n* Commands for easy switching between versions\n\nFolding is done by the plugin [SimpylFold](https://github.com/tmhedberg/SimpylFold).\n\nHow to install\n--------------\n\nUse one of the following plugin managers:\n\n* [dein](https://github.com/Shougo/dein.vim)\n* [vim-plug](https://github.com/junegunn/vim-plug)\n* [vundle](https://github.com/VundleVim/Vundle.vim)\n* [pathogen](https://github.com/tpope/vim-pathogen)\n\nConfiguration\n-------------\n\n### Option variables\n\nSet variable to `1` to enable or `0` to disable.\n\nFor example to enable all syntax highlighting features you can add the\nfollowing command to your `~/.config/nvim/init.vim` or `~/.vimrc`:\n```vim\nlet g:python_highlight_all = 1\n```\n| Variable                                      | Description                                                    | Default |\n| --------------------------------------------- | -------------------------------------------------------------- | ------- |\n| `g:python_version_2`                          | Python 2 mode                                                  | `0`     |\n| `b:python_version_2`                          | Python 2 mode (buffer local)                                   | `0`     |\n| `g:python_highlight_builtins`                 | Highlight builtin objects, types, and functions                | `0`     |\n| `g:python_highlight_builtin_objs`             | Highlight builtin objects only                                 | `0`     |\n| `g:python_highlight_builtin_types`            | Highlight builtin types only                                   | `0`     |\n| `g:python_highlight_builtin_funcs`            | Highlight builtin functions only                               | `0`     |\n| `g:python_highlight_builtin_funcs_kwarg`      | Highlight builtin functions when used as kwarg                 | `1`     |\n| `g:python_highlight_exceptions`               | Highlight standard exceptions                                  | `0`     |\n| `g:python_highlight_string_formatting`        | Highlight `%` string formatting                                | `0`     |\n| `g:python_highlight_string_format`            | Highlight syntax of `str.format` syntax                        | `0`     |\n| `g:python_highlight_string_templates`         | Highlight syntax of `string.Template`                          | `0`     |\n| `g:python_highlight_indent_errors`            | Highlight indentation errors                                   | `0`     |\n| `g:python_highlight_space_errors`             | Highlight trailing spaces                                      | `0`     |\n| `g:python_highlight_doctests`                 | Highlight doc-tests                                            | `0`     |\n| `g:python_highlight_func_calls`               | Highlight functions calls                                      | `0`     |\n| `g:python_highlight_class_vars`               | Highlight class variables `self`, `cls`, and `mcs`             | `0`     |\n| `g:python_highlight_operators`                | Highlight all operators                                        | `0`     |\n| `g:python_highlight_all`                      | Enable all highlight options above, except for previously set. | `0`     |\n| `g:python_highlight_file_headers_as_comments` | Highlight shebang and coding headers as comments               | `0`     |\n| `g:python_slow_sync`                          | Disable for slow machines                                      | `1`     |\n\n### Commands\n\n| Command         | Description        |\n| --------------- | ------------------ |\n| `Python2Syntax` | Switch to Python 2 |\n| `Python3Syntax` | Switch to Python 3 |\n","funding_links":[],"categories":["Tutorial"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-python%2Fpython-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-python%2Fpython-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-python%2Fpython-syntax/lists"}