Change:
It is possible to follow local links for the markdown? For example, I have two splits for a markdown file: one for editing, and the other one for previewing. If I have a local link . When clicking this link in the preview split, is it possible for both the two splits automatically switch to Further, is it possible to sync two scroll bars for the preview split and the edit split?
That would be nice for docs written in Markdown.
VSCODE 1.7.1 on Windown 8.1 Currently the links are working in the preview Pane, but can not be followed from editor with like it is possible for normal links !
I just checked in a fix to support identifying links in the markdown editor . will tackle clicking local links in the preview itself. Please give it a try in the next insiders build
Tried the insiders build, works as expected. Great work, thanks Update: Spaces in the file names are not recognized

Discussion:
"onLanguage:markdown", "onCommand:markdown.showPreview", "onCommand:markdown.showPreviewToSide", <del> "onCommand:markdown.showSource" </del> <ins> "onCommand:markdown.showSource", "onLanguage:markdown" </ins> ], "contributes": { "languages": [

<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import * as vscode from 'vscode'; import * as path from 'path'; export default class MarkdownDocumentLinkProvider implements vscode.DocumentLinkProvider { private _linkPattern = /([[^]]*](s*?)(S+?)(s+[^)]*)?)/g; public provideDocumentLinks(document: vscode.TextDocument, token: vscode.CancellationToken): vscode.DocumentLink[] { const results: vscode.DocumentLink[] = []; const base = path.dirname(document.uri.fsPath); const text = document.getText(); this._linkPattern.lastIndex = 0; let match: RegExpMatchArray | null; while ((match = this._linkPattern.exec(text))) { const pre = match[1]; const link = match[2]; const offset = match.index + pre.length; const linkStart = document.positionAt(offset); const linkEnd = document.positionAt(offset + link.length); try { let uri = vscode.Uri.parse(link); if (!uri.scheme) { // assume it must be a file let file; if (uri.path[0] === '/') { file = path.join(vscode.workspace.rootPath, uri.path); } else { file = path.join(base, uri.path); } uri = vscode.Uri.file(file); } results.push(new vscode.DocumentLink( new vscode.Range(linkStart, linkEnd), uri)); } catch (e) { // noop } } return results; } }; </ins>

import * as vscode from 'vscode'; import * as path from 'path'; import TelemetryReporter from 'vscode-extension-telemetry'; <ins> import DocumentLinkProvider from './documentLinkProvider'; </ins> interface IPackageInfo { name: string;

const symbolsProviderRegistration = vscode.languages.registerDocumentSymbolProvider({ language: 'markdown' }, symbolsProvider); context.subscriptions.push(contentProviderRegistration, symbolsProviderRegistration); <ins> context.subscriptions.push(vscode.languages.registerDocumentLinkProvider('markdown', new DocumentLinkProvider())); </ins> context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreview', showPreview)); context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreviewToSide', uri => showPreview(uri, true))); context.subscriptions.push(vscode.commands.registerCommand('markdown.showSource', showSource));