Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artnc/sublime-file-locking
File locking plugin for Sublime Text
https://github.com/artnc/sublime-file-locking
sublime-text
Last synced: about 1 month ago
JSON representation
File locking plugin for Sublime Text
- Host: GitHub
- URL: https://github.com/artnc/sublime-file-locking
- Owner: artnc
- License: mit
- Created: 2013-01-08T17:48:08.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-04T16:27:30.000Z (about 11 years ago)
- Last Synced: 2024-10-12T22:43:51.801Z (2 months ago)
- Topics: sublime-text
- Language: Python
- Homepage:
- Size: 174 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Sublime Text 2 File Locking
====================This is a quick plugin I wrote for a team project I'm working on that's contained entirely in a shared Dropbox folder.
Files are locked when opened and unlocked when closed. Due to the lack of a listener in the API for detecting operations that read files but don't actually open an editing buffer (e.g. file previews), this plugin works best when those features are avoided. Otherwise you'll run into issues with files that are locked even though nobody's editing them.
Use at your own risk and hack as needed. Released under the MIT license.
Getting started
---------------
1. Have all team members go to "Tools > New Plugin..." and paste in the contents of FileLocking.py.
2. In the "Settings" block, all members must set the 'project' and 'lockext' variables to the same string. The 'me' variable may optionally be given a custom value per member (the default value is the name of the currently logged in user).
3. Have everyone save the plugin file to the default Packages/User directory, ideally in unison.
4. Add viewlocks.py to the project's root directory.Viewing locks
------------
Display all currently existing locks, their owners, and their creation times:python viewlocks.py
Display all locks set by the team member who has their 'me' variable set to 'john':
python viewlocks.py john
Manually remove all locks set by john:
python viewlocks.py john -r