天行健,君子以自强不息;地势坤,君子以厚德载物。
每个人都有惰性,但不断学习是好好生活的根本,共勉!
文章均为学习整理笔记,分享记录为主,如有错误请指正,共同学习进步。
IDEA打开文本文件问题
- 背景
 - 问题一 Open matching files in associated application
 - 解决方法
 
- 问题二 Open matching files as text and auto-detect file type by content
 - 解决方法
 
- 提示忽略
 
背景
在IDEA中创建了text文本文件,并编辑了内容,后续打开时弹出窗口如下
 
 一共有三个选项,默认是第二个然后内容是Text不用动,直接OK就是可以的
 但如果你像我一样想试试别的选择,就会有点小问题
 我选择了第三个,如果你选了第一个请看后面的内容
问题一 Open matching files in associated application
选择Open matching files in associated application选项后ok再打开文件
 就会出现弹窗用本机其他软件打开,选择IDEA打开也没反应
 
解决方法
File–>Settings…
 或者快捷键
 ctrl+alt+s
 进入设置
 Editor–>File Types–>Recognized File Types–>Files opened in associated app…–>选中text按减号删除—>然后Apply–>OK即可
 
再次打开就没问题了
问题二 Open matching files as text and auto-detect file type by content
如果选择了第一个选项,ok后想再次打开文本文件就没反应了
解决方法
File–>Settings…
 或者快捷键
 ctrl+alt+s
 进入设置
 Editor–>File Types–>Recognized File Types–>Files types auto-detected by file…–>选中text按减号删除—>然后Apply–>OK即可
 
再次打开就没问题了
提示忽略
正常打开文本文件后会提示"The file was explicitly re-assigned to plain text"
 对应有两个选项,我们不要选,直接点齿轮设置按钮然后选择Disable inspection
 就不会提示了
 



















