TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ptext: A Nano-like text editor built with pure C

147 pointsby asicspover 1 year ago

9 comments

JonChesterfieldover 1 year ago
Cool. Compiled easily, made a binary that does look like a text editor, let me make new files and edit an existing one. Only linked against libc, about a thousand lines of C.<p>So yeah, that is indeed a working text editor that doesn&#x27;t link against ncurses and the like. Smaller than I would have expected it to be.
评论 #38763340 未加载
评论 #38767737 未加载
gdevenyiover 1 year ago
Don&#x27;t forget about Micro<p><a href="https:&#x2F;&#x2F;micro-editor.github.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;micro-editor.github.io&#x2F;</a>
评论 #38766831 未加载
pjmlpover 1 year ago
Not really pure C, plenty of #include that aren&#x27;t part of ISO C standard.<p>Pure UNIX&#x2F;POSIX C, more likely.
评论 #38765639 未加载
评论 #38765834 未加载
teo_zeroover 1 year ago
I&#x27;ll not enter the pure-C vs. non-pure-C debate, but this heavily depends on a Unix-like OS and VT100-like terminal. Forget to compile it for Windows, for example.<p>Very nice project, well organized, with a terse style. Comments are missing but not necessary.
评论 #38768239 未加载
mise_en_placeover 1 year ago
Neat, I am a fan of minimalist text editors. There is also uEmacs: <a href="https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;uemacs">https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;uemacs</a>
schemescapeover 1 year ago
I’ve been wanting to make a library for Pico-like interfaces, with the commands and key combinations listed at the bottom of the screen.<p>I thought something like that must exist, but I haven’t found it yet…
评论 #38764829 未加载
WesolyKubeczekover 1 year ago
I guess it’s hardcoded to run in something shaped like xterm or better.
评论 #38764004 未加载
评论 #38766332 未加载
6R1M0R4CL3over 1 year ago
read the code. and i liked doing that. while i do mostly java, c++ and rust. there is an elegant beauty in pure C code.
mogohover 1 year ago
pure? Is nano not pure enough?
评论 #38763465 未加载
评论 #38763214 未加载
评论 #38763213 未加载
评论 #38763573 未加载
评论 #38763038 未加载