You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can get the relative path to any file in the workspace.
1
+
## Relative Path Extension for VS Code
3
2
4
-
Just press `Ctrl+Shift+H` (Mac: `Cmd+Shift+H`) and select a file. If your workspace has more than 1000 files, you will be prompted to filter that list first.
5
-
Alternatively, you can press open command palette `F1` and search for `Relative Path`.
3
+
> Get the relative path to any file in your workspace
4
+
5
+
Press `Ctrl+Shift+H` (Mac: `Cmd+Shift+H`) and start typing the file you want.
First, you will need to install Visual Studio Code. In the command palette (`Ctrl-Shift-P` or `Cmd-Shift-P`) select `Install Extension` and choose `RelativePath`.
11
12
12
-
## Important
13
+
1.[Install the extension](https://marketplace.visualstudio.com/items?itemName=jakob101.RelativePath&ssr=false#overview)
14
+
2. Press `Ctrl+Shift+H` (Mac: `Cmd+Shift+H`) and start typing the file you want.
15
+
- The file you want will appear as you type
16
+
3. 🪄 Select your file from the dropdown!
17
+
18
+
<br/>
19
+
20
+
## Options
21
+
22
+
The following settings are customizable. **You likely do not need these, but if you do, here are your options**
23
+
24
+
They can be set in user preferences (`ctrl+,` or `cmd+,`) or workspace settings (`.vscode/settings.json`).
25
+
26
+
```javascript
27
+
// A glob by which to filter results
28
+
"relativePath.includeGlob":"/**/*.*",
29
+
30
+
// An array of glob keys to ignore when searching.
31
+
"relativePath.ignore": [
32
+
"**/node_modules/**",
33
+
"**/*.dll",
34
+
"**/obj/**",
35
+
"**/objd/**"
36
+
],
37
+
38
+
// Excludes the extension from the relative path url (Useful for systemjs imports).
39
+
"relativePath.removeExtension":false,
40
+
41
+
// An array of extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)
42
+
"relativePath.excludedExtensions": [
43
+
".js",
44
+
".ts"
45
+
],
46
+
47
+
// For performance optimization the default limit for quick filter is 1,000 files.
48
+
// Extending this may lead to performance issues
49
+
"relativePath.searchCountLimit":1000,
50
+
51
+
// Removes the leading ./ character when the path is pointing to a parent folder.
52
+
"relativePath.removeLeadingDot":true,
53
+
54
+
// "Omit path parts by matched Regular Expressions
55
+
"relativePath.omitParts": [
56
+
"\\/index$"
57
+
],
58
+
59
+
```
60
+
61
+
<br/>
62
+
63
+
## Performance Information
13
64
14
65
### In Multi root workspaces:
15
66
@@ -18,35 +69,14 @@ cached to improve search performance. If you have multiple large folders part of
18
69
frequent switches between folders might slow you down.
19
70
20
71
### In Single project workspace:
72
+
21
73
The caching of the filelist in the project happens only once. If your workspace contains a lot of files
22
74
please wait for the initial file list to be created.
23
75
24
-
## Options
25
-
The following Visual Studio Code settings are available for the RelativePath extension. They can be set in user preferences (`ctrl+,` or `cmd+,`) or workspace settings (.vscode/settings.json).
26
-
```javascript
27
-
// An array of glob keys to ignore when searching.
28
-
"relativePath.ignore": [
29
-
"**/node_modules/**",
30
-
"**/*.dll",
31
-
"**/obj/**",
32
-
"**/objd/**"
33
-
],
34
-
35
-
// Excludes the extension from the relative path url (Useful for systemjs imports).
36
-
"relativePath.removeExtension":false,
37
-
38
-
// For performance optimization the default limit for quick filter is 1000 // files. Extending this limit might lead to performance drop but will
39
-
// still provide the quick filtering feature.
40
-
"relativePath.extendedLimit":3000
41
-
42
-
// An array of extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)
43
-
"relativePath.excludedExtensions": [
44
-
".js"
45
-
],
46
-
```
47
-
48
76
## Bugs
77
+
49
78
Report them [here](https://github.com/jakob101/RelativePath).
Copy file name to clipboardExpand all lines: package.json
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,9 +39,14 @@
39
39
}
40
40
],
41
41
"configuration": {
42
-
"title": "RelativePath extension configuration",
42
+
"title": "RelativePath",
43
43
"type": "object",
44
44
"properties": {
45
+
"relativePath.includeGlob": {
46
+
"type": "string",
47
+
"default": "/**/*.*",
48
+
"description": "A glob by which to filter results"
49
+
},
45
50
"relativePath.ignore": {
46
51
"type": "array",
47
52
"default": [
@@ -58,15 +63,15 @@
58
63
"relativePath.removeExtension": {
59
64
"type": "boolean",
60
65
"default": false,
61
-
"description": "Excludes the extension from the relative path url (Useful for systemjs imports)."
66
+
"description": "Excludes the file extension from the relative path url (Useful for systemjs imports)."
62
67
},
63
68
"relativePath.excludedExtensions": {
64
69
"type": "array",
65
70
"default": [
66
71
".js",
67
72
".ts"
68
73
],
69
-
"description": "An array of extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)"
74
+
"description": "An array of file extensions to exclude from the relative path url (Useful for used with Webpack or when importing files of mixed types)"
70
75
},
71
76
"relativePath.removeLeadingDot": {
72
77
"type": "boolean",
@@ -79,6 +84,11 @@
79
84
"\\/index$"
80
85
],
81
86
"description": "Omit path parts by matched Regular Expressions"
87
+
},
88
+
"relativePath.searchCountLimit": {
89
+
"type": "integer",
90
+
"default": 1000,
91
+
"description": "Max number of files searched in quick filter. Extending this may lead to performance issues."
0 commit comments