Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
by sindresorhusPython
Last 12 weeks · 0 commits
4 of 6 standards met
Hi everyone, Recently, I needed to run Sublime Text 2 and discovered that the EditorConfig plugin no longer works on this old version () . After looking into the issue, I realized it only requires a few minor compatibility adjustments: 1. Import Logic: Sublime Text 2 uses absolute/global imports, so the modern relative imports fail with a . I added a block to fall back to absolute imports. 2. Missing OrderedDict: Python 2.6 (used by ST2) lacks the class. I added a fallback implementation by Raymond Hettinger and updated the third-party licenses file accordingly. 3. Source Code Encoding: ST2's Python environment throws errors when encountering non-ASCII characters in source files unless a coding header is present. I added to the modified files to resolve this. I know Sublime Text 4 is the current standard, but some legacy projects and older environments still rely on ST2 for specific syntax support. I hope these changes can be merged to keep the plugin accessible for those edge cases. Thanks!
This was discussed in the closed issue #27 but I can't find a solution. Issue: Every time I save a file (Mac OSX 10.13.6 and Sublime Text 3.1.1) the cursor position jumps near the top of the file. _Originally posted by @drguiom in https://github.com/sindresorhus/editorconfig-sublime/issues/27#issuecomment-451121209_ IssueHunt Summary xinyan0906 has been rewarded. Backers (Total: $40.00) issuehunt ($40.00) Submitted pull Requests #104 Fix: Prevent cursor from jumping to top of file on save Tips Checkout the Issuehunt explorer to discover more funded issues. Need some help from other developers? Add your repositories on IssueHunt to raise funds.
Fixes #27 Fixes #76 Problem When saving a file, uses to remove trailing blank lines. In Sublime Text, calling automatically shifts the viewport's focus to the point of modification, causing an annoying jump to the top (or bottom) of the file for the user. Solution This PR stores the before the operation is performed and immediately restores it using right after. This ensures that the user's scroll position remains exactly where it was before the save, while still correctly cleaning up trailing newlines. Funded on IssueHunt. IssueHunt Summary Referenced issues This pull request has been submitted to: #76: Scroll position moves on save
Repository: sindresorhus/editorconfig-sublime. Description: Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors Stars: 1775, Forks: 111. Primary language: Python. Languages: Python (100%). License: MIT. Topics: editorconfig, python, sublime-package, sublime-text, sublime-text-plugin. Latest release: v1.2.1 (3mo ago). Open PRs: 0, open issues: 8. Last activity: 3mo ago. Community health: 71%. Top contributors: sindresorhus, jfcherng, oker1, deathaxe, vogu66, kzvi, ktrotter-emsi, jwortmann, andig, Xinyan0906 and others.