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

推荐订阅源

罗磊的独立博客
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Vercel News
Vercel News
D
DataBreaches.Net
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Cloudbric
Cloudbric
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
月光博客
月光博客
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog
Security Latest
Security Latest
T
Threatpost
GbyAI
GbyAI
K
Kaspersky official blog
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
V
V2EX
W
WeLiveSecurity
Recorded Future
Recorded Future
WordPress大学
WordPress大学
L
LINUX DO - 最新话题
O
OpenAI News
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
有赞技术团队
有赞技术团队
Attack and Defense Labs
Attack and Defense Labs
N
News | PayPal Newsroom
H
Help Net Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Webroot Blog
Webroot Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
腾讯CDC
Scott Helme
Scott Helme
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
E
Exploit-DB.com RSS Feed

博客园 - zy_nic

SRM 424 div1 900 ProductOfPrices 翻译 .. contest contest 我的2-sat模板 Solution to GCJ Practice Contest Problem C, Cycles 约瑟夫问题的数学方法 我的模板 图的应用 pku3411 今天的比赛 关于建图的 死老鼠安装成功 pku3141 先帖个题目上来 hnu 11028 hnu 11015 joj 儿死三八 pku 1273
emacs的c++mode
zy_nic · 2008-10-22 · via 博客园 - zy_nic
C/C++ 模式
指定为C++模式的方法:一般根据扩展名自动设定,不用指定,不过有时候你希望.h文件是C++模式的(缺省是C模式),
在文件第一行(或其末尾)上加入 
// -- C++ -- 
语法高亮:不是C模式专有,顺便提一下,M-x global-font-lock-mode RET 或在.emacs中加入(global-font-lock-mode t)。
在console下,Emacs21才支持语法高亮。(语法高亮,不同关键字用不同的颜色来突出) 
子模式: 
  • auto-state 当你输入时自动缩进,自动换行 
  • hungry-state 当你Backspace时,自动删除尽可能多的空白和空行 
  • C-c C-t 同时转换(开/关)auto-state和hungry-state子模式 
  • C-c C-a 转换 auto-state 子模式 
  • C-c C-d 转换 hungry-state 子模式 
  • C-c . 设置缩进风格(按TAB键可列出可用的风格,缺省的为gnu,其缩进为2个字符;linux为8个;k&r为5个...) 
  • TAB 重新缩进当前行 
  • M-/ 自动补齐(缓冲区中能找得到的串) 
  • M-; 行尾加入注释 
  • C-c C-e 扩展宏 
  • C-c C-c 注释掉整个区域 
  • C-c C-" 将区域中的每一行结尾都加入一个'"'字符 
编译和调试
  • -x compile RET 编译 
  • M-x gdb RET 调试 
  • C-x ` (出错信息中)下一个错误,一个窗口显示错误信息,另一个显示源码的出错位置 
  • C-c C-c 转到出错位置 
启动gdb调试器后,光标在源码文件缓冲区中时: 
  • C-x SPC 在当前行设置断点 
  • C-x C-a C-s step 
  • C-x C-a C-n next 
  • C-x C-a C-t tbreak 
  • C-x C-a C-r continue