Skip to content

An extension to be able to configure vscode to write code automatically.

Notifications You must be signed in to change notification settings

chwoerz/vscode-autowriter

Repository files navigation

Autowriting feature for VSCode (WIP)

Tl;dr

I've wanted to create a "smooth" programming presentation using VSCode. But because I've made to many mistakes while typing, I've decided to create an extension to write the code automatically.

Example:

Example video

How to use the extension?

Because it's work in progress, you need to open the project in your VSCode and start the extension.ts using the debugger. In the opened vscode, just open the prepared file(example.js for example) and start the "Autowriter" command. This will create another file with the same filename as the one which was opened when the command was executed. For example if you use the example.js file, a tt.example.js file will be created and written into it.

How to initialize the code?

  1. Create the code you wanted to have typed:
class Example {
    aMethod() {
        const aLine = 'hello';
        const anotherLine = 'again';
    } 
    // this method will be written first
    anotherMethod() {
        console.log('first');
    }
}
  1. Add the autowriter markers. The following are available until now:
    • #x| : You are able set a sequence in which order the code will be written.
    • |&ws=X&we| : By adding this suffix to a line, the writer will wait X seconds before continuing.

This added to the code will look like that:

#0|class Example {
    #5|aMethod() {
        #7|const aLine = 'hello';
        const anotherLine = 'again';
    #6|} 
    #8|// After this line, autowriter will wait for 2 seconds  |&ws=2&we|
    // And now it's done
    #2|// this method will be written first
    anotherMethod() {
        #4|console.log('first');
    #3|}
#1|}

About

An extension to be able to configure vscode to write code automatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published