Skip to content

Commit 2156625

Browse files
committed
Add first version
0 parents  commit 2156625

24 files changed

+2509
-0
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*]
2+
indent_style = tab
3+
indent_size = 2
4+
charset = utf-8
5+
trim_trailing_whitespace = true
6+
insert_final_newline = true

.eslintrc.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": ["@typescript-eslint"],
9+
"rules": {
10+
"@typescript-eslint/class-name-casing": "warn",
11+
"@typescript-eslint/semi": "warn",
12+
"curly": "warn",
13+
"eqeqeq": "warn",
14+
"no-throw-literal": "warn",
15+
"semi": "off",
16+
"indent": ["error", "tab"]
17+
},
18+
"overrides": [
19+
{
20+
"files": ["**/*.ts"],
21+
"excludedFiles": ["**/fixtures/**"]
22+
}
23+
]
24+
}

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
out
2+
node_modules
3+
.vscode-test/
4+
*.vsix

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint"
6+
]
7+
}

.vscode/launch.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": [
14+
"${workspaceFolder}/src/test/fixtures",
15+
"--extensionDevelopmentPath=${workspaceFolder}"
16+
],
17+
"outFiles": [
18+
"${workspaceFolder}/out/**/*.js"
19+
],
20+
"preLaunchTask": "${defaultBuildTask}"
21+
},
22+
{
23+
"name": "Extension Tests",
24+
"type": "extensionHost",
25+
"request": "launch",
26+
"runtimeExecutable": "${execPath}",
27+
"args": [
28+
"--extensionDevelopmentPath=${workspaceFolder}",
29+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
30+
],
31+
"outFiles": [
32+
"${workspaceFolder}/out/test/**/*.js"
33+
],
34+
"preLaunchTask": "${defaultBuildTask}"
35+
}
36+
]
37+
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

.vscode/tasks.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

.vscodeignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.vscode/**
2+
.vscode-test/**
3+
out/test/**
4+
src/**
5+
.gitignore
6+
vsc-extension-quickstart.md
7+
**/tsconfig.json
8+
**/.eslintrc.json
9+
**/*.map
10+
**/*.ts

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Change Log
2+
3+
## [0.1.0] - 2020-04-22
4+
5+
Initial release
6+
7+
### Features
8+
- Copy text via keyboard shortcut
9+
- Copy text via command palette
10+
- Copy text via context menu

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Snippet Copy
2+
3+
Ever wanted to copy part of a source file as a snippet and paste it somewhere else, like in Slack or in a GitHub comment?
4+
Previously, you either got a bunch of unnecessary indentation that made the snippet ugly to read or you had to manually un-tab the snippet, copy, and then reset the indentation.
5+
6+
With **Snippet Copy** you can automatically get a snippet added to your clipboard with all the unnecessary indentation already removed!
7+
8+
## Features
9+
10+
You can use the extension via a bunch of different ways:
11+
12+
- Via the Command Palette and the pre-configured keyboard shortcut
13+
14+
![Command in Command Palette](images/command-palette.png)
15+
16+
- Via the Context Menu on selected text in the editor
17+
18+
![Command in Context Menu](images/context-menu.png)

images/command-palette.png

83.5 KB
Loading

images/context-menu.png

51.5 KB
Loading

0 commit comments

Comments
 (0)