Skip to content

Sofa (Stackoverflow Answers) is a vscode extension that helps you to search a question on stackoverflow.com and brings you the scripts in the answers.

License

Notifications You must be signed in to change notification settings

msgul/sofa-extension

Repository files navigation

Sofa (StackOverflow Answers) Extension

Sofa is an open-source MIT-licensed vscode extension that is designed to speed up your coding time by bringing you the answers related to your problem on stackoverflow.com.

Features

  • Retrieves all answers and scrapes the code out of them for you to use it.
  • Retrieved codes can be selected from vscode QuickPick.
  • Language of the current file is added to your question automatically.
  • Opens your browser and directs you to the StackOverflow page (optional)

Usage

  • Type your problem and press ctrl + enter to retrieve the codes. You can pick one of the results from vscode.QuickPick. Press ctrl + enter again to get the StackOverflow question page.

alt text

Examples

  • Python
# read line by line
with open(filename) as file:
    lines = file.readlines()
    lines = [line.rstrip() for line in lines]
  • Html
<!-- div side by side -->
<div style="width: 100%; display: table;">
    <div style="display: table-row">
        <div style="width: 600px; display: table-cell;"> Left </div>
        <div style="display: table-cell;"> Right </div>
    </div>
</div>
  • Javascript
 // traverse all elements
var all = document.getElementsByTagName("*");
for (var i = 0; i < all.length; i++) {
    console.log(all[i].nodeName);
}

About

Sofa (Stackoverflow Answers) is a vscode extension that helps you to search a question on stackoverflow.com and brings you the scripts in the answers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published