eclipse for the first time using the basic settings

 
 

  Recently, some friends just started learning Java using eclipse encountered some problems due to coding I ask, then summarize the first time after installing eclipse what we generally basic things should be set right -
the great God who do not Kanla na.

First, modify the workspace default encoding

  • On the menu navigation bar Window -> Preferences to open the "Preferences" dialog box
 
 
  • Navigation tree to navigate to General -> Workspace
 
 

Second, modify the file type's default encoding

Sometimes we need a certain type of file, such as: .jsp, .java, etc.

  • On the menu navigation bar Window -> Preferences to open the "Preferences" dialog box
  • Left navigation tree to navigate to General -> Content Types
  • Find the right type of file you want to modify, to my side Java Source源文件as an example
  • In the following Default encoding, the input box UTF-8-> Update-> OK
 
 

Above, the default encoding general we use the CSS style file, HTML page file, Properties configuration files, Java source files, Javascript script file, JSP page file, XML configuration files and other common files were converted to UTF-8

Third, change the default font size

The default font is really small, poor, in order toSeductive(Eye -. -) We need to adjust the font size appropriate

  • On the menu navigation bar Window -> Preferences to open the "Preferences" dialog box
  • Navigation tree to navigate to General -> Appearance -> Colors and Fonts
 
 

The right to see a font has a lot of options, we only need to modify the inside of the Basic

  • Basic -> Text Font -> Edit
    here I changed the font 12
 
 

Fourth, properly closed validation check grammar start speed optimization

  • On the menu navigation bar Window -> Preferences to open the "Preferences" dialog box
  • Navigation tree to navigate Validation
  • The Manual (Manual) held stationary, which will leave only Build Classpath Dependency Validator, other all removed.
 
 

以后如果需要对文件进行校验检查的时候,在需要校验的文件上点击右键,点击Validate进行检查。

五、设置tab键为4个空格,统一格式

  • 在菜单导航栏上 Window-->Preferences 打开"首选项"对话框
  • 左侧导航树导航到 General-->Editors-->Text Editors
  • 选中右侧的 Insert space for tabs
 
 
  • 在菜单导航栏上 Window-->Preferences 打开"首选项"对话框
  • 左侧导航树导航到 java-->code style- ->formatter
  • 点击右侧的edit,选择左侧 tab policy 的值为 spaces only,并确保下方的空格个数为4
  • 确定,应用保存即可,若出现应用Apply按钮为灰色的情况,需要回到上一步,点击new按钮,根据当前的样式重新生成一个新的样式并保存,名字可以随便起,新建以后重复上一步骤,编辑该样式即可。
 
 
 
 

六、修改背景颜色为护眼豆沙绿

据说长时间使用可以缓解眼疲劳哦
(吐槽:开什么玩笑,远离编程才能缓解眼疲劳好吗)

  • 在菜单导航栏上 Window-->Preferences 打开"首选项"对话框
  • 左侧导航树导航到 General-->Editors-->Text Editors
  • 点击右侧下方 Appearance color options 中的B ackground color
  • 取消掉右侧 System Default 的勾选,点击 Color 后的色块将出现颜色选择面板
  • 点击展开规定自定义颜色,本例使用的背景色是喜大普奔的豆沙绿,比较柔和,设置为:色调:85。饱和度:123。亮度:205 即可,添加到自定义颜色并在自定义颜色中选中确定保存即可。
 
 
 
 

除此之外我们还可以设置非代码区的背景颜色(win7环境)

  • 桌面右键个性化-->窗口颜色
  • 高级外观设置-->项目-->窗口-->颜色
 
 
 
 

七、修改搜狗输入法设置,防止 ctrl+shift+f 热键冲突

在我们使用eclipse的时候通常使用 ctrl+shift+f 快捷键来快速代码格式化,是否有时候发现命名并没有更改默认的快捷键设置,而使用快捷键无法格式化代码却在菜单中点击可以呢,其实这是windows上一些其他程序的热键冲突导致的,像搜狗输入法就会优先占用 ctrl+shift+f 快捷键为切换简繁输入法的功能,那么我们就需要取消或者变更搜狗输入法的这个快捷键喽~

  • 搜狗输入法右键-->工具箱-->属性设置-->按键
  • 取消右侧系统功能快捷键中简繁切换的勾选
 



Guess you like

Origin www.cnblogs.com/xiangxiushu/p/11089094.html