clion 快捷键_CLion基本使用

Clion是一个cross-platform C/C++ ide,写c++的时候我最喜欢的是windows的 VS,Mac上我喜欢Clion

如何获得免费版CLion?

  • 答:找身边的学生或者老师,用教育邮箱免费申请
  • 传送门 https://www.jetbrains.com/student/

用教育邮箱都可以

f635691b2fe79a051e804b51320d8260.png

1.设置代码提示模糊匹配格式-去掉大小写匹配

7b5c5b9ac720166c9f6ea81317e9c38b.png

2.万能的灯泡提示 ⌥ + Enter(Windows 下是 Alt + Enter),哪里不会点哪里

29e05eda2816938160984976abdca066.png
提示增加命名空间std

3.好用的live template

df3291dd6acd2f25c2cb9107ae830e6d.png
void testFunc1(){
    std::vector<int> nums{2,3,4};
    //输入for 按tab键
    for (int i = 0; i < nums.size(); ++i) {
        
    }
    
    //输入iter 按tab
    for (const auto &num : nums) {
        
    }
    
    //输入itit按tab
    for (auto num = nums.begin(); num != nums.end(); ++num) {
        
    }

}

4. surround with

快捷键 ⌥ + ⌘ + T

fb678cb34cb0f9e103dfdeffca26153f.png

5.Use first, define later

想用的函数可以直接写出来,clion会提示去创建函数

739f00144788149acee3dfcc52873c06.png

6. Follow the hierarchal view

CLion provides you with a wide range of code navigation options:

  • use standard goto declaration/definitions features;
  • jump to a related symbol, recent files, or the place you edited last;
  • search for any class, file or symbol by its name;
  • use the context search with Find Usages;
  • navigate through the current file using the File Structure view;
  • and benefit from several hierarchical views, including Call Hierarchy, Type Hierarchy and Imports Hierarchy.

Call Hierarchy is my favorite. It lets me see the whole call stack with all the branches in details. Looks so simple, isn’t it?

bf120e7e9880d549372c9f24b3c49d84.png

7.Refactor 万般皆重构-重构功能很强大

bc2c7cebf9ea0579d2210d39afd7acc2.png

轻度使用中,未完,待续...

参考:

http://www.cplusplus.com/articles/L0pk4iN6/​www.cplusplus.com 工欲善其事,可能会有用的Clion技巧​www.jianshu.com
c9a12d12d91a036b3a92254e7fedb52b.png
https://www.youtube.com/watch?v=Srnw1dI1iAA​www.youtube.com

附快捷键:

1af44e14e154191c2e12c4372fbe6e0f.png

86b751ae97383689713779162de662c7.png
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值