See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| Set-PSReadLineKeyHandler -Chord "c,i" -ViMode Command -ScriptBlock { VIChangeInnerBlock } | |
| Set-PSReadLineKeyHandler -Chord "c,a" -ViMode Command -ScriptBlock { VIChangeOuterBlock } | |
| Set-PSReadLineKeyHandler -Chord "d,i" -ViMode Command -ScriptBlock { VIDeleteInnerBlock } | |
| Set-PSReadLineKeyHandler -Chord "d,a" -ViMode Command -ScriptBlock { VIDeleteOuterBlock } | |
| Set-PSReadLineKeyHandler -Chord "c,s" -ViMode Command -ScriptBlock { VIChangeSurround } | |
| Set-PSReadLineKeyHandler -Chord "d,s" -ViMode Command -ScriptBlock { VIDeleteSurround } | |
| Set-PSReadLineKeyHandler -Chord "Ctrl+a" -ViMode Command ` | |
| -ScriptBlock { VIIncrement $args[0] $args[1] } | |
| Set-PSReadLineKeyHandler -Chord "Ctrl+x" -ViMode Command ` | |
| -ScriptBlock { VIDecrement $args[0] $args[1] } |
| function! s:format_coc_diagnostic(item) abort | |
| return (has_key(a:item,'file') ? bufname(a:item.file) : '') | |
| \ . '|' . (a:item.lnum ? a:item.lnum : '') | |
| \ . (a:item.col ? ' col ' . a:item.col : '') | |
| \ . '| ' . a:item.severity | |
| \ . ': ' . a:item.message | |
| endfunction | |
| function! s:get_current_diagnostics() abort | |
| " Remove entries not belonging to the current file. |
| from subprocess import Popen, PIPE | |
| import re | |
| import glob | |
| import shlex | |
| class Pipeline(object): | |
| def __init__(self, descriptor=None): | |
| self.steps = [] | |
| if descriptor: | |
| for step in descriptor.split("|"): |
| Key Name Resulting Keystroke | |
| {F1} - {F24} Function keys. For example: {F12} is the F12 key. | |
| {!} ! | |
| {#} # | |
| {+} + | |
| {^} ^ | |
| {{} { | |
| {}} } | |
| {Enter} ENTER key on the main keyboard | |
| {Escape} or {Esc} ESCAPE |
| Get-Command # Retrieves a list of all the commands available to PowerShell | |
| # (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
| Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
| Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
| Get-Help # Get all help topics | |
| Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
| Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
| Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
| $LazyLoadProfile = [PowerShell]::Create() | |
| [void]$LazyLoadProfile.AddScript(@' | |
| Import-Module posh-git | |
| '@) | |
| $LazyLoadProfileRunspace = [RunspaceFactory]::CreateRunspace() | |
| $LazyLoadProfile.Runspace = $LazyLoadProfileRunspace | |
| $LazyLoadProfileRunspace.Open() | |
| [void]$LazyLoadProfile.BeginInvoke() |
| " :[range]SortGroup[!] [n|f|o|b|x] /{pattern}/ | |
| " e.g. :SortGroup /^header/ | |
| " e.g. :SortGroup n /^header/ | |
| " See :h :sort for details | |
| function! s:sort_by_header(bang, pat) range | |
| let pat = a:pat | |
| let opts = "" | |
| if pat =~ '^\s*[nfxbo]\s' | |
| let opts = matchstr(pat, '^\s*\zs[nfxbo]') |
| from __future__ import with_statement | |
| import itertools | |
| import functools | |
| import sys | |
| def download_files(keylist): | |
| return [key.get_contents_to_filename('%s/%s' % (TEMP_DIR, key.name)) | |
| for key in keylist] |