mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Confusing explanation for activeEditorMedium
in window.title
setting (fixes #35534)
This commit is contained in:
parent
7fb86f8462
commit
3dd4318683
|
@ -43,13 +43,13 @@ export class SettingsDocument {
|
|||
private provideWindowTitleCompletionItems(location: Location, range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[]> {
|
||||
const completions: vscode.CompletionItem[] = [];
|
||||
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "e.g. myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "e.g. myFolder/myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "e.g. /Users/Development/myProject/myFolder/myFile.txt")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "e.g. myFolder1, myFolder2, myFolder3")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "e.g. /Users/Development/myProject")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "e.g. myFolder")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "e.g. /Users/Development/myFolder")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorShort}', range, localize('activeEditorShort', "e.g. the file name (myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorMedium}', range, localize('activeEditorMedium', "e.g. the path of the file relative to the workspace folder (myFolder/myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${activeEditorLong}', range, localize('activeEditorLong', "e.g. the full path of the file (/Users/Development/myProject/myFolder/myFile.txt)")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootName}', range, localize('rootName', "name of the workspace (e.g. myFolder or myWorkspace)")));
|
||||
completions.push(this.newSimpleCompletionItem('${rootPath}', range, localize('rootPath', "file path of the workspace (e.g. /Users/Development/myWorkspace)")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderName}', range, localize('folderName', "name of the workspace folder the file is contained in (e.g. myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${folderPath}', range, localize('folderPath', "file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)")));
|
||||
completions.push(this.newSimpleCompletionItem('${appName}', range, localize('appName', "e.g. VS Code")));
|
||||
completions.push(this.newSimpleCompletionItem('${dirty}', range, localize('dirty', "a dirty indicator if the active editor is dirty")));
|
||||
completions.push(this.newSimpleCompletionItem('${separator}', range, localize('separator', "a conditional separator (' - ') that only shows when surrounded by variables with values")));
|
||||
|
|
|
@ -321,13 +321,13 @@ Note that there can still be cases where this setting is ignored (e.g. when usin
|
|||
'default': isMacintosh ? '${activeEditorShort}${separator}${rootName}' : '${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}',
|
||||
'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'title' },
|
||||
`Controls the window title based on the active editor. Variables are substituted based on the context:
|
||||
\${activeEditorShort}: e.g. myFile.txt
|
||||
\${activeEditorMedium}: e.g. myFolder/myFile.txt
|
||||
\${activeEditorLong}: e.g. /Users/Development/myProject/myFolder/myFile.txt
|
||||
\${folderName}: e.g. myFolder
|
||||
\${folderPath}: e.g. /Users/Development/myFolder
|
||||
\${rootName}: e.g. myFolder1, myFolder2, myFolder3
|
||||
\${rootPath}: e.g. /Users/Development/myWorkspace
|
||||
\${activeEditorShort}: e.g. the file name (myFile.txt)
|
||||
\${activeEditorMedium}: e.g. the path of the file relative to the workspace folder (myFolder/myFile.txt)
|
||||
\${activeEditorLong}: e.g. the full path of the file (/Users/Development/myProject/myFolder/myFile.txt)
|
||||
\${folderName}: name of the workspace folder the file is contained in (e.g. myFolder)
|
||||
\${folderPath}: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)
|
||||
\${rootName}: name of the workspace (e.g. myFolder or myWorkspace)
|
||||
\${rootPath}: file path of the workspace (e.g. /Users/Development/myWorkspace)
|
||||
\${appName}: e.g. VS Code
|
||||
\${dirty}: a dirty indicator if the active editor is dirty
|
||||
\${separator}: a conditional separator (" - ") that only shows when surrounded by variables with values`)
|
||||
|
|
|
@ -126,7 +126,6 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput {
|
|||
|
||||
@memoize
|
||||
private get shortDescription(): string {
|
||||
|
||||
return paths.basename(labels.getPathLabel(resources.dirname(this.resource), void 0, this.environmentService));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue