zoukankan      html  css  js  c++  java
  • eclispe pydev tab改回 空格找到方法了,这个链接:http://stackoverflow.com/questions/23570925/eclipse-indents-new-line-with-tabs-instead-of-spaces

    看这个链接:

    I've followed all the suggestions here.

    When I press return, I get a new line that is indented with tabs instead of spaces.

    If I backspace to clear the tabs, and then press TAB a series of times, it correctly indents with spaces.

    I'm pretty sure I have all my settings set up correctly. I created a new Code Style > Formatter policy for every language in the project, and specified to always use spaces. It seems as though these settings are partially active (ex: when I press tab), but inactive when I use return. I tried restarting Eclipse. I'll try restarting the computer now...

    I'm using Mac OS X 10.9.2 and a Liferay Developer Studio (1.6.3.v201312111844) version of Eclipse (not sure which Eclipse build its based on though).

    Can anyone think of another setting/solution to ensure that newlines are created with spaces instead of tabs? I recently saw http://editorconfig.org/, and I'm wondering if there's some interference.

    Thanks for any suggestions

    if the file has existing lines that are using tabs, then Enter will respect that and try to create new lines in a similar way (see this comment by topchef for a solution). Also, it could be something in Liferay Studio's proprietary settings is overriding Eclipse standard preferences (as suggested by user John).

    Keep in mind that each type of editor in Eclipse can have its own preferences and perhaps that's what you're running into here. You can try to find them all by opening Preferences and searching for "indent" in the search field. That will show all the preferences pages where indentation can be configured.

    enter image description here

    Also note that the Formatter settings don't have any affect on as-you-type formatting; that's for when you select a file or group of files or part of a file and choose Source > Format from the menu.

  • 相关阅读:
    @RequestParam方式传入list
    编写优美代码的七条规范(Python版)
    汇编程序设计入门
    CSP-S2020解题报告(待完成!)
    [USACO18JAN]MooTube
    DP优化
    AFO记
    考前总结
    清北学堂周末刷题班第五场
    清北学堂考前综合刷题班第四场
  • 原文地址:https://www.cnblogs.com/hackerl/p/6773874.html
Copyright © 2011-2022 走看看