You are browsing as a guest. Sign up (or log in) to start making projects!

Boilerplater

  • 16 Devlogs
  • 72 Total hours

As a programmer, I'm sure you already caught yourself multiple times going to other projects or to the internet just to copy boilerplate functions and snippets. Even if you never caught yourself doing it, you've probably done it uncountable times. This is frustrating, disrupts the flow state and consumes precious coding time. Boilerplater is here to end it. Now you can highlight code snippets, save them with ctrl+u (mac: cmd+u), give them a title and description, categorize them by tags and language and easily find and paste them later, all without ever having to go out of Vscode or your project. If your cursor loses focus, simply refocus the cursor and click directly in the "paste snippet" button (nothing else, otherwise the focus will be lost)

Ship #1

Hello guys! Today, I celebrate the shipping of Br-Zueira’s Boilerplater! It serves for saving (ctrl+u, mac: cmd+u) and pasting code snippets (ctrl+alt+u, mac: cmd+alt+u). It also supports categorizing them by tags and languages, giving descriptions and titles to them and even supports macros:

  • [%%] -> Supports variables such as BP_FILENAME, some sandboxed JavaScript evaluation and even macros (variables defined by yourself using JavaScript code)
  • [#n#] -> Tabstops, where n is an index (they’re standard Vscode tabstops: evaluated from 1 to infinity and beyond, 0 at last and can be grouped like in the example)
  • [#n|fallback#] -> Tabstops but with a placeholder/fallback if user chooses to ignore the tabstop.
    Also, you can change the snippets by the extension itself (supports basic coding editor features, such as tab indenting or auto closing quotes).
    For all this. it uses an in-build webview (ctrl+alt+u, mac: cmd+alt+u).
    You can easily download it at Microsoft Extension Marketplace (just search by “Br-Zueira’s Boilerplater”). If you want, you can also get the VSIX file at GitHub Releases (then open it with Vscode and click “Download VSIX extension”). It’s plug and enjoy! Hope it really lets your workflow more frictionless!
  • 16 devlogs
  • 72h
  • 12.85x multiplier
  • 922 Stardust
  • Frictionless
Try project → See source code →
Open comments for this post

4h 54m 27s logged

Hello, fellow devs! Today, I added this gorgeous gif into the readme. Also, I had to escape the content to be shown in list view (I discovered it the worst way: completely breaking the layout while playing around with HTML and PHP snippets) and added aliases for languages, which makes searching them easier. I removed frontend JS and CSS into actual files (they were string literals before) and, finally, moved some files around.

0
0
4
Open comments for this post

5h 41m 43s logged

Hello, fellow devs! Yesterday, I completed the CRUD for languages! You can now create, edit or even delete them. The internal name is searched in Vscode language IDs. To delete one, if you have snippets assigned to them, you can either reassign all of them to another language or delete them along with the language, both automatically made.

0
0
4
Open comments for this post

5h 4m 54s logged

Hello, fellow devs! Today, I solved the issues related to macros. Also, letting it in configs.json made it messy, counterintuitive and less integrated with the rest of the extension, so I moved it to the webviews, together with the snippets, tags and languages you’re all already familiar with. The evaluation order is very important, as this is what grants macros can be access by other macros, only needing to come before in the order. I’m really excited to see what will people come up with this.

0
0
2
Open comments for this post

5h 52m 9s logged

Hello. I started preparing extension for release, so I changed compiler to esbuild and added the GSL3 license to my project. I also started trying to implement the option to add custom variables for templating to the extension, but it’s all broken.

0
0
3
Open comments for this post

3h 44m 18s logged

Hello, fellow devs! I just wrote this info at index about the extension and about the templates. I also made the snippet typing more similar to Vscode coding, so now it has tab indentation, and auto closes quotes, parenthesis, brackets, curly braces and the extension templating “[%” and “[#”. TODO: Fix the frontend script that is now half broken.

0
0
3
Open comments for this post

5h 49m 54s logged

Hello guys! Now we can paste the snippets directly from the webview! Also, it has dynamic templates:
[%%] executes simple JavaScript and can access variables such as BP_FILENAME or BP_YEAR
[##] turns into tabstops: can be either
[# index #] or [# index | default value #]
where index is an integer, and optional default value can be used when user just skips the tabstop
However, as a safety measure, the templates can’t directly access vscode, node.js or other possibly sensible variables, methods or functions.

0
0
2
Open comments for this post

9h 54m 24s logged

Hey guys! I did a search engine for the list view! It was kind of complex, as I had to deal with SQL joins (INNER JOIN for NOT NULL fields and LEFT JOIN for optional fields), a bridge table, JSON_GROUP_ARRAY, etc, but in the end, it worked. Just have to test a bit more the search bar as it sometimes have some glitches (every time a search is fired, the whole DOM is reloaded).

0
0
2
Open comments for this post

6h 36m 33s logged

Hey guys! Today, I officially finished CRUD! For all models! I also made tag assignment work 100% fine. Besides that, I improved a bit on code modularity and organization and did small patches. TODO: Improve the “R” and maybe the “D” of CRUD; Add the snippet pasting part (the app focus).

0
0
2
Open comments for this post

7h 37m 18s logged

Hey guys! Now tom-select is 100% working and model editing works… at least 50%? Well, and we also have this gorgeous CSS styling that matches with Vscode styles!

0
0
3
Open comments for this post

3h 4m 44s logged

Today, the edit view successfully shows the right values, but the tomSelect dropdowns I tried to add were a complete failure. TODO: Fix tomSelect.

0
0
2
Open comments for this post

3h 1m 39s logged

Hey guys! Yesterday, I tried to make this generic model editor, and I have the layout, but the functionality is… well… broke for now. Also, to correct a bug, I had to rewrite the whole functionality of the database. Now I have a proper class wrapper instead of passing the raw database object around.

0
0
2
Open comments for this post

2h 18m 15s logged

Hello, programmers! Today, I improved more the webview, this time focusing on the list view. It successfully shows a list of one of the valid models (snippets, tags, languages) and information about it. TODO: Model creation page, editing page, ensure paginate works 100% fine and add searchbar functionality. Struggles: SQL (I’m having to work with raw SQL as sql.js doesn’t have ORM) and avoiding spaghetti code (trust me: It’s hard when you have to write HTML and frontend JavaScript in string literal templates)

0
0
2
Open comments for this post

2h 34m 38s logged

Hey guys! Today, I worked in the webwiew. For now, we have this index page and the start of the list page. Other improvements were more docs focused, such as improving README.db and code commenting, and enforcing code structure with new ‘helpers’ folder and ‘html’ TypeScript file.

0
0
2
Open comments for this post

2h 48m 49s logged

Hey guys. After fighting against compilation errors, caused by libs and shx, and errors in database managing, caused by thread throttling by setup-ing db, that were solved using asynchronous tasks instead, now I’ve finally done the snippet creation part! The extension successfully saves the snippet, along with its title, description (can be empty) and language (in another table, as the snippet itself only carries the language id, in a one-to-many relationship, as a snippet have only one language, while a language can have lots of snippets). Next step is continuing the CRUD part, probably by including a web view.

0
0
4
Open comments for this post

2h 22m 40s logged

For now, Boilerplater has just a function to copy a highlighted section (still does nothing with it) and a database loader/initializer. Most of the concepts are still just ideas. Next step is to program the snippet saving part in database.

0
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…