The code-casefile ExtensionThe code-casefile extension allows the Visual Studio Code editor to read, modify, export, import, and share casefiles -- hierarchical collections of advanced bookmarks. FeaturesCasefile BookmarksA casefile bookmark is not just a file path and line number. Each bookmark includes:
Additionally, casefile bookmarks can be organized as child bookmarks of other casefile bookmarks, creating a bookmark hierarchy. Manipulating the hierarchy of the bookmarks in the current casefile is accomplished by dragging a bookmark to the lower-right side of the bookmark beneath which it should appear; the drop indicator bar should cover part of the lower edge of the bookmark beneath the cursor and not extend all the way to the left edge of the intended parent bookmark. Dragging further to the left will position the dragged bookmarks as next-sibling after the bookmark under the cursor (after all of that bookmarks descendants). If the drag cursor is moved over the upper part of a bookmark, dropping will place the dragged bookmarks as previous-sibling to the bookmark under the cursor. Casefile SharingWhile working on an issue, collecting and referencing a set of bookmark can be a very valuable tool. Potentially even more valuable is the ability to share the set of bookmarks with other users referencing the same Git repository. If a sharing peer has been selected, the current casefile (i.e. forest of bookmarks) can be shared from the "Share current casefile to selected peer" button in the Current Casefile view title bar. Casefiles that have been shared can be imported into the current casefile at any time from the Shared Casefiles view. When the current set of bookmarks is no longer relevant, keeping all of those bookmarks around can create unnecessary and frustrating clutter but disposing of them means discarding the accumulated knowledge about the issue they represent. Casefile sharing also solves this problem, as you can share the current casefile to store it for possible later use -- i.e. sharing it with your future self. As shared casefiles are stored and communicated using Git, creating a set of bookmarks shared between a limited set of users (relative to the visibility of the code) is possible by creating an additional, non-public Git repository configured as an additional remote for the project to which the restricted casefiles can be shared. This could be important for investigation and validation of security issues. Also, the history of shared casefiles is maintained in Git, so any information deleted can (via external tools) be recovered. Casefiles as TextMany projects use an issue tracking system as part of their project management approach. It may be beneficial to record a casefile's bookmarks into the ticket if they are relevant to the work done for the ticket. This extension offers an "Open as text in editor" option from the Current Casefile title menu which presents the current casefile as a single text in a new editor. If the current text editor in Visual Studio Code or VSCodium contains an exported text form of a casefile, a context (i.e. "right-click") menu option to "Import casefile bookmarks" will be available to import the serialized bookmarks into the current casefile. RequirementsGitTo track the location of bookmarks across versions of a file, it is necessary to have access to versioning information. Currently, this capability is only integrated with the Git vesion control system, though others could be added in the future. In order to access the version control system information, the DiffWhen a comparison between the live content of a file and the content at a specific commit are needed, the Extension SettingsCasefile > External Tools: PathA value that overrides the Casefile: Use Default Keyboard ShortcutsIf this option is disabled, the default keyboard shortcuts defined by this extension are disabled. The standard Visual Studio Code mechanism for assigning commands to key combinations can be used to assign custom sequences to code-casefile bookmark creation or other commands. Default Keyboard ShortcutsThe code-casefile extension comes with a predefined, default keyboard shortcut for creating new bookmarks:
Working ExampleThe
It is important to note that the casefile list and the casefiles themseleves are live on the project repository: imported bookmarks may reference code that is no longer in the project. Local changes would have to be shared with the GitHub repository to make changes persistent and visible to others; doing so requires commit permission on the repository. You could experiment by making a GitHub clone of the repository, configuring it as an additional Git remote ( A Few Things to Try
Release NotesPlease see the CHANGELOG document. Reporting IssuesPlease use the project's issue tracker on GitHub. Following extension guidelinesPlease ensure that you've read through the extensions guidelines and follow the best practices when proposing modifications to this extension. |