惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
T
Tailwind CSS Blog
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
博客园 - 叶小钗
N
Netflix TechBlog - Medium
罗磊的独立博客
量子位
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
B
Blog
腾讯CDC
爱范儿
爱范儿
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
雷峰网
雷峰网
G
Google Developers Blog
Google DeepMind News
Google DeepMind News

0x01 byte

我在 2025 年看完的书 西班牙之行 2025 年初展望 2024 年底曼谷之行 荐书:The Blind Watchmaker 王垠传播的「自然视力恢复法」真的有用吗? 从高考志愿到职业选择 浅谈 Apple Intelligence 2024 年,我为什么开始为搜索付费 运气与努力 刷新了一下对内容审查粒度的认知 离开心动和 TapTap 如何反转一个链表? 如何高效地协作开发:一些 Google 的实践 关于 LeanCloud 被心动/TapTap 收购 small talk #3:从 IPFS 聊到 Web 的开放性 small talk #2:聊聊用 M1 芯片的新 Mac 怀念两位老师:Stan Eisenstat 和 Paul Hudak small talk #1: 聊聊你的私有云 如何在 Emacs 里做所有事 Remark Ninja: 一个简单的评论系统 Woman、man、camera、TV:如何做一个完整的深度学习应用 荐书:走出戈壁:我的中美故事 LeanCloud 开始周期性远程工作了 树莓派:用 Pi-hole 来保护隐私和过滤广告 爱国指南 我在 2019 年觉得不错的几个习惯 WeWork 的兴衰和创投的游戏 计算机专业学生该如何提高自己 怎样利用好路上的时间
Emacs Smart Split
blog.incoming@1byte.io (江宏) · 2009-03-13 · via 0x01 byte

I spend a lot of time in front of Emacs in a terminal window, and I share my configuration across all my computers. At work I have a large monitor, so I split the emacs frame into 3 side-by-side 80-column windows. At home I have a smaller screen with room only enough for two windows. Sometimes I just use the laptop display. To share the same configuration file, I use the following snippet:

(defun smart-split ()
  "Split the frame into 80-column sub-windows, and make sure no window has
   fewer than 80 columns."
  (interactive)
  (cl-lables ((smart-split-helper (lambda (w)
                (if (> (window-width w) (* 2 81))
                  (let ((w2 (split-window w 82 t)))
                    (smart-split-helper w2))))))
    (smart-split-helper nil)))

(smart-split)

The smart-split function split the emacs frame into a maximum number of 80-column windows. A very portable solution.