No.42 WebStorm使用

作者: testleaf | 来源:发表于2020-01-17 10:07 被阅读0次

一、WebStorm使用

html:5或者!
按Tab键
生成HTML5网页骨架

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

</body>
</html>



html:4s
按Tab键
生成HTML4网页骨架

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
</head>
<body>

</body>
</html>



html:xt
按Tab键
生成XHTML网页骨架

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
</head>
<body>

</body>
</html>

二、WebStorm快捷键

快捷键 功能
Ctrl + / 注释语句

三、WebStorm的一些小问题

  1. 如果选择使用右键New→File来创建HTML文件,那么设置Name时不能加后缀名.html,即使选择文件类型为HTML,文件创建好后最好右键Refactor→Rename加上后缀名.html,不然无法正常在浏览器中预览。

  2. File→Settings→Tools→Web Browsers,设置可以用来预览的浏览器。

  3. WebStorm汉化:关闭WebStorm,在GitHub上找到jetbrains-in-chinese汉化包,选择里面的WebStorm文件夹的对应版本的汉化文件,下载后放到WebStorm安装目录的lib子目录里面就可以了,打开WebStorm,汉化完成。
    不过我更喜欢使用英文版的,因为汉化的不全面。

    GitHub上找到jetbrains-in-chinese汉化包
    4.中文字体显示难看:File→Settings→Editor→Font,Fallback font设置为Microsoft YaHei Mono,感觉这个中文字体超好看。
    5.代码提示:File→Power Save Mode,取消勾选就可以代码提示。
    File→Settings→Editor→General→Code Completion,
    设置Show the documentation popup in 0 ms,
    设置Show the parameter info popup in 0 ms,
    代码提示显示更快了。
    HTML没有代码提示功能,必须输入尖括号才提示。

相关文章

  • No.42 WebStorm使用

    一、WebStorm使用 html:5或者!按Tab键生成HTML5网页骨架 html:4s按Tab键生成HTML...

  • 如何长期使用webstorm

    如何长期使用webstorm? 喜欢使用webstorm的你是否有这样的困扰,webstorm为什么不是免费的?找...

  • webstorm配置常见问题及优化

    1. webstorm里使用git bash webstorm内置terminal为Command Prompt。...

  • 使用WebStorm初始化React Native项目步骤

    使用WebStorm初始化React Native项目步骤 初始化项目:打开WebStorm,当前使用来开发Rea...

  • mac下快捷键整理

    编辑器webstorm 和 Intellij Idea 以前在linux下使用webstorm和Intellij ...

  • Webstorm的安装使用

    Webstorm 我们推荐大家使用webstorm来编写网页代码下载地址:http://www.jetbrains...

  • ReactNative 调试

    目前是webstorm调试,Vscode搞了俩天没成功,(建议用webstorm,使用和AndroidStudio...

  • WebStorm使用

    (主题)[https://github.com/S1ngS1ng/dotFiles] Webstorm集成NodeJS

  • WebStorm使用

    节能模式 节能模式会关闭代码提示 可以帮助初学者强制记忆 建议初学者打开此模式 修改字体 文件模板 Bookmar...

  • webStorm使用

    代码格式化快捷命令 webStorm开启Emmet语法https://www.cnblogs.com/shanzh...

网友评论

    本文标题:No.42 WebStorm使用

    本文链接:https://www.haomeiwen.com/subject/mkkczctx.html