把 Caps Lock 變成智慧的 Control 以及 Escape :
- 單獨輕按一下就是 Escape 。
- 若按下時同時按著其他鍵,就會是 Control 。
這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)
- Send Escape if you tap Caps Lock alone.
/********************************************************************************* | |
Copyright (c) 2019, Greg Lockwood | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
usingnamespace @import("std").builtin; | |
pub const endian = Endian.Little; | |
pub const output_mode = OutputMode.Obj; | |
pub const link_mode = LinkMode.Static; | |
pub const is_test = false; | |
pub const single_threaded = false; | |
/// Deprecated: use `std.Target.cpu.arch` | |
pub const arch = Arch.x86_64; | |
pub const abi = Abi.gnu; |
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and
returning the cached result when the same
inputs occur again.
— wikipedia
Tested on macOS:
zig test -femit-bin=zig-out/bin/my-test src/bla.zig
,
otherwise there will be no executable to debug.args
item):// https://github.com/ziglang/zig/issues/10710#issue-1116978295 | |
const std = @import("std"); | |
const assert = std.debug.assert; | |
const TypeInfo = std.builtin.TypeInfo; | |
pub fn Type(comptime T: TypeInfo) type { | |
return comptime switch (T) { | |
// but what is the type of type? |