This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-PsReadlineKeyHandler -Chord 'Ctrl+e' -ScriptBlock { | |
$line = $cursor = $null | |
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref] $line, [ref] $cursor) | |
if ($cursor -eq $line.Length) { | |
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptSuggestion() | |
} | |
else { | |
[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
Known to work with: | |
The Glorious Glasgow Haskell Compilation System, version 7.4.2 | |
Extra library dependency: | |
Safe | |
To compile: | |
ghc -o HackAssembler Hack.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-align-single-equals () | |
"Align on a single equals sign (with a space either side)." | |
(interactive) | |
(align-regexp | |
(region-beginning) (region-end) | |
"\\(\\s-*\\) = " 1 0 nil)) | |
(global-set-key (kbd "C-c a") 'my-align-single-equals) |