| name | about | title | labels | assignees |
|---|---|---|---|---|
Feature request |
Suggest an idea for this project |
Is your feature request related to a problem? Please describe.
| name | about | title | labels | assignees |
|---|---|---|---|---|
Feature request |
Suggest an idea for this project |
Is your feature request related to a problem? Please describe.
| name | about | title | labels | assignees |
|---|---|---|---|---|
Bug report |
Create a report to help us improve |
Describe the bug
Zed's Vim mode replicates familiar Vim behavior while integrating modern features like semantic navigation and multiple cursors. This cheat sheet summarizes essential shortcuts and settings to help you navigate and edit code efficiently in Zed.
Toggle Vim Mode."vim_mode": true or false.| # Zig Programming Cheat Sheet | |
| This guide condenses the key ideas from Chapter 1 of the Zig book, emphasizing Zig's syntax, semantics, workflows, and philosophy. It distills nuanced language details, technical rules, compiler constraints, and examples for direct application by AI or technical users. | |
| --- | |
| ## 1. Zig Philosophy and Paradigm | |
| - Zig is a **low-level, general-purpose, modern programming language** designed for safety, control, and simplicity. | |
| - Major design goal: **Less is more** (removes confusing/unsafe C/C++ behaviors; adds consistency). |
| // To run: | |
| // clang core-audio-sine-wave.c -framework AudioUnit && ./a.out | |
| #include <AudioUnit/AudioUnit.h> | |
| #define SAMPLE_RATE 48000 | |
| #define TONE_FREQUENCY 440 | |
| #define M_TAU 2.0 * M_PI | |
| OSStatus RenderSineWave( | |
| void *inRefCon, |
| import asyncio | |
| import numpy as np | |
| import pandas as pd | |
| async def fun2(x): | |
| return x * 2 | |
| async def main(): | |
| df = pd.DataFrame(np.arange(10), columns=['old']) |
| fn printDefault(c: u8) void { | |
| std.debug.print("{c}", .{ c }); | |
| } | |
| fn animate(buffer: *[]u8, rows: u32, cols: u32, comptime print_fn: fn(u8) void) void { | |
| for(0..rows) |dy| { | |
| for(0..cols) |dx| { | |
| const idx = dy * cols + dx; | |
| const pipe_tile = buffer.*[idx]; | |
| std.debug.print("\x1B[{d};{d}H", .{ dy, dx }); |
| const std = @import("std"); | |
| pub fn main() void { | |
| std.log.info("mutable closure:",.{}); | |
| runMutDemo(); | |
| std.log.info("const closure:",.{}); | |
| runConstDemo(); | |
| } |
| import { srgb } from "@thi.ng/color"; | |
| import type { Color, css } from "@thi.ng/color"; | |
| import { randMinMax2 } from "@thi.ng/vectors"; | |
| import type { Vec } from "@thi.ng/vectors"; | |
| import { repeatedly } from "@thi.ng/transducers"; | |
| import { draw } from "@thi.ng/hiccup-canvas"; | |
| import type { IToHiccup } from "@thi.ng/api"; | |
| const NUM_CELLS = 10; | |
| const WIDTH = window.innerWidth; |