配置 CDT 环境

下载

下载 CDT 安装包, 解压运行 CDT

导入配置文件

File -> Import -> General -> Preferences, 将 cdt_setting.epf 导入(目测仅设置了快捷键)

设置字体

Window -> Preferences -> General -> Appearance -> Colors and Fonts, 设置 C/C++ Editor 字体为 Mono Space, 大小 12

设置代码模板

Window -> Preferences -> C/C++ -> Code Style -> Code Templates

Files -> C++ Header File

${filecomment}

#ifndef _${include_guard_symbol}INCLUDED_
#define _${include_guard_symbol}INCLUDED_

${includes}

${namespace_begin}

${declarations}

${namespace_end}
#endif /* _${include_guard_symbol}INCLUDED_ */

Comments -> Files

/*
 *  Create: ${date}
 *  Author: ${user}
 */

Window -> Preferences -> C/C++ -> Editor -> Templates

增加

cmt

// --------------------------------------------------------------------------------

设置 C++0x 支持

Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build-in Compiler Settings
in the text box entitled Command to get compiler specs append -std=c++0x

Properties -> C/C++ Build -> Settings ->Tool Settings ->GCC C++ Compiler ->Dialect

select ISO C++11 from the Language standard drop down

设置 Tab 方式

  1. Window->Preferences->General->Editors->Text Editors->Insert spaces for tabs
  2. Windows->Preferences->C++->Code Style->Formatter,点击 Acitivie Profile 边上的 Edit 按钮,在打开的页面中的 General settings 中,令 Tab policy 为 Space only

资源

http://download.csdn.net/detail/kzjay/8951115

你可能感兴趣的:(配置 CDT 环境)