How to correct unbalanced parenthesis in smartparens mode
2025-02-16
When I yank code into a smartparens-mode buffer and encounter an issue where a closing parenthesis is missing, I can manually turn off smartparens-mode, add the closing parenthesis, and then re-enable smartparens-mode. While this approach works, it’s a bit inconvenient. There is a simpler way to correct unbalanced parenthesis. According to this StackOverflow answer quote-insert (bound by default to C-q) is unaffected by paredit-mode(and also smartparens-mode). Simply place your cursor at the point that you want to insert parenthesis, press C-q, then enter the missing closing parenthesis.…
Linux 下排查内存占用过大的问题
2024-03-14
前几天,我的 Linux 桌面遇到一个内存泄漏的问题:锁定屏幕后,在过一段时间后,无法打开屏幕,可以看到屏幕亮了,但是 xscreensaver 无法运行,甚至不能使用 Ctrl+Alt+F2 进入其他…
Linux 办公记(二): LibreOffice 设置中文字体
2023-07-31
上一篇文章介绍了如何在 Linux 下设置打印机,但是如果在 Linux 上没有正确设置字体,显示效果和打印效果都很不理想。而且网上一些关于日常使用 Linux 的争论中,字处…
Linux 办公记(一):设置打印机
2023-07-26
经常听到有人在网上争论「Linux 办公是否可行」之类的问题,于是我决定亲自试一试,并把一些设置过程记录一下,既可供日后参考,也希望可以对 Linux 的…
修复 i3pyblocks 在 Python 3.11 下的 asyncio 的兼容性问题
2023-05-11
今天打开电脑,发现我的 i3 状态栏一片红色,发生甚么事了?哦,原来是昨天,Arch 仓库的 Python 版本升级到了 3.11 ,有一些不兼容更新,把 asyncio 中的 generator-based coroutines 移除了,…
Arch Linux 挂载第二块硬盘
2023-04-21
如果在安装 Arch Linux 后,想要挂载另外一块硬盘,可以按以下步骤操作: 1. 创建分区 先检查现在的分区 lsblk 或 fdisk -l 记下新安装的磁盘,比如说,/dev/sda ,对…
Magit 中的 timemachine : 查看文件修改历史
2022-12-19
Emacs 中可以使用 git-timemachine 浏览 git 仓库中的文件的历史版本,Bozhidar Batsov 在他的一篇博文中比较详细地介绍过这一插件的功能。 但如果你已经在使用 Magit (应该有很…