We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
将选中的文本替换
选中文本转化为大写:
import * as vscode from 'vscode' import { Range, commands } from 'vscode' export function activate(context: vscode.ExtensionContext) { console.log('active') const disposable = commands.registerTextEditorCommand('uppercase.toUpperCase', toUpperCase) context.subscriptions.push(disposable) } function toUpperCase(editor: vscode.TextEditor) { editor.edit(builder => { editor.selections.forEach(selection => { const range = new Range(selection.start, selection.end) const text = editor.document.getText(range) || '' builder.replace(selection, text.toLocaleUpperCase()) }) }) } export function deactivate() { return }
参考:https://github.com/ruiquelhas/vscode-uppercase
选中 hover 效果
export function activate(context: vscode.ExtensionContext) { const hover = languages.registerHoverProvider({ scheme: '*', language: '*', }, { provideHover(document, position, token) { return new Hover('hello world') } }) context.subscriptions.push(hover) }
参考:https://github.com/thegtproject/vscode-hoverhex
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用案例
将选中的文本替换
选中文本转化为大写:
参考:https://github.com/ruiquelhas/vscode-uppercase
选中 hover 效果
参考:https://github.com/thegtproject/vscode-hoverhex
The text was updated successfully, but these errors were encountered: