Skip to content
Visual Studio Code extension for saving and inserting code fragments.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
images
src
test
.gitignore
.travis.yml
.vscodeignore
CHANGELOG.md
LICENSE
README.md
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

Code Fragments extension for Visual Studio Code

Build Status

With this extension you can save static code fragments for later use, and easily insert them into source files whenever needed.
It can be specifically useful when doing coding demos during presentations.

Features

After installing the extension, a new section called CODE FRAGMENTS is added to the Explorer, which shows a list of the previously saved fragments.
You can save a piece of code by selecting it in the editor, and then executing the "Save selection as Code Fragment" from the Command Palette (brought up with Ctrl+Shift+P) or in the context menu.
Clicking on an existing fragment in the list inserts its content into the editor at the current cursor position.

Saving a selection as a Code Fragment:

Saving Code Fragments.

Inserting a Code Fragment to the current cursor position:

Inserting Code Fragments.

Release Notes

1.2.0

Add the capability to always ask for the name of the fragment on save (controlled by the codeFragments.askForNameOnCreate setting) (#5).

1.1.1

Fix a bug causing not being able to save fragments until the Explorer is opened (#4).

1.1.0

Add export/import to Json, and delete all fragments features.

1.0.0

Initial release of Code Fragments.

Credits

The icons are licensed under CC 3.0 BY, and made by

Downloaded from www.flaticon.com.

You can’t perform that action at this time.