Sourcebin VS Code Extension
Quickly create and share code snippets on Sourcebin directly from Visual Studio Code.
Features
- Upload Code on Sourcebin: Easily upload the selected code or the entire file to Sourcebin and get a shareable link.
- Get Code from Sourcebin: Retrieve code snippets from Sourcebin using a key or URL.
- Status Bar Integration: Toggle the visibility of the Sourcebin status bar item.
- Context Menu Integration: Access Sourcebin commands from the editor context menu.
- Keyboard Shortcuts: Use keyboard shortcuts to quickly upload or retrieve code snippets.
Commands
sourcebin.uploadBin : Upload the selected code or the entire file to Sourcebin.
sourcebin.getCode : Retrieve code from Sourcebin using a key or URL.
Configuration
You can configure the extension settings in your VS Code settings:
Available Settings
sourcebin.defaultFileName : Default file name for Sourcebin (leave empty for active file name).
sourcebin.defaultAuthorName : Default author name for Sourcebin (leave empty for username).
sourcebin.defaultDescription : Default description for Sourcebin (leave empty for extension name and author).
sourcebin.enableContextMenu : Enable Sourcebin in the editor context menu.
sourcebin.enableStatusBarItem : Enable Sourcebin status bar item.
sourcebin.enableKeybinding : Enable the keyboard shortcut for Sourcebin.
sourcebin.onLinkCreated : Action to perform when a Sourcebin link is created: copy to clipboard, open in browser, or show both options.
sourcebin.fileExistsAction : Action when file exists: createNew, overwrite, append, prepend, compare, or ask.
Keybindings
Ctrl+S Ctrl+B (Windows/Linux) or Cmd+S Cmd+B (Mac): Upload Code on Sourcebin.
Ctrl+G Ctrl+B (Windows/Linux) or Cmd+G Cmd+B (Mac): Get Code from Sourcebin.
Installation
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
- Search for "Sourcebin" and click Install.
Usage
- Open a file or select a code snippet in the editor.
- Use the command palette (
Ctrl+Shift+P or Cmd+Shift+P on macOS) and type Upload Code on Sourcebin .
- Alternatively, use the keyboard shortcut
Ctrl+S Ctrl+B (or Cmd+S Cmd+B on macOS).
- A Sourcebin link will be created and copied to your clipboard, opened in the browser, or both, based on your settings.
Get Code from Sourcebin
- Use the command palette (
Ctrl+Shift+P or Cmd+Shift+P on macOS) and type Get Code from Sourcebin .
- Alternatively, use the keyboard shortcut
Ctrl+G Ctrl+B (or Cmd+G Cmd+B on macOS).
- Enter the Sourcebin key or URL when prompted.
- The code snippet will be retrieved and opened in a new editor tab.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This extension is licensed under the MIT License.
| |