Skip to content

Instantly share code, notes, and snippets.

@gerane
Created July 2, 2016 00:16
Show Gist options
  • Save gerane/584990f2abdf717076321c74d4261ca6 to your computer and use it in GitHub Desktop.
Save gerane/584990f2abdf717076321c74d4261ca6 to your computer and use it in GitHub Desktop.
Place in Microsoft.VSCode_profile.ps1
Register-EditorCommand `
-Name 'ToDo.InsertToDo' `
-DisplayName 'Insert ToDo' `
-SuppressOutput `
-ScriptBlock {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$Message = Read-Host 'Please enter Todo Message'
$ToDo = "# [$((Get-Date).ToShortDateString())] ToDo: $($Message)"
$context.CurrentFile.InsertText($ToDo, $context.CursorPosition)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment