zoukankan      html  css  js  c++  java
  • android studio或者IntelliJ代码样式的设置

    使用过程中发现了一些与Eclipse不同的地方,在这里提供一些设置方法
     
    1. Backspace会将开头的空格和换行符一并删除,如果要禁用
    Settings -> Editor -> General -> Smart Keys -> Backspace -> Unindent: 可
    以设为Disabled
     
    2. switch/case中的case会被自动缩进一级
    Settings -> Editor -> Code Style -> Java -> Wrapping and Braces ->
    'switch' statement -> Indent 'case' branches 不选
     
    3. xml格式与eclipse默认完全不一致,没有找到完全相同的设置方法,只能基本相似
    Settings -> Editor -> Code Style -> XML -> Tabs and Indents ->
    Continuation indent: 设成4
    Settings -> Editor -> Code Style -> XML -> Other -> Align attributes 不选
    Settings -> Editor -> Code Style -> XML -> Other -> Spaces -> In empty
    tag 选
    Settings -> Editor -> Code Style -> XML -> Other -> Android -> Use
    custom formatting settings for Android XML files 选
     
    4. 如果对代码中写死的汉字字符串过敏
    Settings -> Editor -> General -> Code Folding -> Android String
    References 不选
     
    5.如果Eclipse转到android studio很多快捷键用不惯。建议可以换
      
  • 相关阅读:
    常用Git代码托管服务分享
    .NET中操作IPicture、IPictureDisp
    Git学习笔记与IntelliJ IDEA整合
    螺旋队列问题
    杂题3道
    .NET 配置文件简单使用
    C++之Effective STL
    不容易理解的 lock 和 merge
    状态模式
    观察者模式
  • 原文地址:https://www.cnblogs.com/shansheng/p/4760202.html
Copyright © 2011-2022 走看看