首页 > 作文

webstorm怎么用文本写代码(webstorm使用初步教程)

更新时间:2023-04-05 07:18:34 阅读: 评论:0

webstorm建立在开源intellij平台之上,jetbrains已经开发和完善了超过15年。其提供了统一的ui,可与许多流行的版本控制系统配合使用,确保在git,github,svn,mercurial和perforce之间提供一致的用户体验。webstorm提供可定制功能,调整它以完全适合您的编码风格,从快捷方式,字体和视觉主题到工具窗口和编辑器布局。

智能编码辅助

webstorm可以帮助您编写出色的代码。其智能编辑器具有代码完成,动态代码分析,代码格式化和重构,可提高您的工作效率,并将您的开发体验提升到一个全新的水平。

支持的语言和框架

webstorm提供javascript,ecmascript 6,typescrip简单漂亮的画t,coffeescript,dart和flow 的一流编码帮助。

webstorm可以帮助您编写html,css,less,sass和stylus代码。

最重要的是,您可以受益于对node.js和流行框架的高级支持,例如react,angular,vue.js,meteor等。

代码智能辅助功能

webstorm分析您的项目,为应用程序中定义的所有方法,函数,模块,变量和类提供最佳代码完成结果。сoding协助是上下文感知的,也可以是特定于框架的。

在webstorm中使用css时,享受属性及其值的代码完成。在less和sass中,获得mixins的帮助。当然,在html中,您可以获得所有标签和属性的代码完成。

代码质量分析与检测

webstorm有数百种内置检查功能,涵盖所有支持的语言。除此之外,您还可以使用eslint,tslint,stylelint,jscs,jshint和jslint。

在您键入时,webstorm编辑器会直接报告所有错误和警告,并提供许多快速修复选项。

webstorm具有可能问题的任何代码行都标记在右侧编辑器装订线中,因此您可以轻松地在长文件中发现错误和警告。

您还可以使用webstorm为整个项目运行代码质量分析,并自动应用选定的快速修复程序。

webstorm使用技巧

webstorm如何更改主题(字体&配色):file -> ttings -> editor -> colors&fonts -> scheme name.主题下载地址如何让webstorm启动的时候不打开工程文件:file -> ttings->general去掉reopen last project on startup.webstorm如何完美显示中文:file -> ttings->appearance中勾选override default fonts by (not recommended),设置name:nsimsun,size:12webstorm如何显示行号:file -> ttings->editor,”show line numbers”打上勾,就显示行号了webstorm如何让代码自动换行:file -> ttings -> editor “u soft wraps in editor” 打上钩,代码就自动换行了如何点击光标,如何webstorm显示在本行末尾:file -> ttings->editor “allow placement of caret after end of line”去掉勾就行了。如何修改webstorm快键键:file -> ttings->keymap,然后双击要修改快捷的功能会有提示框出来,按提示操作如何webstorm换成自己熟悉编辑器的快键键:file ->ttings->keymap,支持像visual studio、eclip、netbeans这样的主流ide。javascript类库提示。file -> ttings -> javascript -> libraries -> 然后在列表里选择自己经常用到的javascript类库,最后download and install就ok了.在webstorm中开发js时发现,需要ctrl + return 才能选候选项:file -> tting -> editor -> code completion -> prelect the first suggestion: “smart” 改为 “always”webstorm中js提示比较迟缓设置策略file -> code completion -> autopopup in 下 1000改为0webstorm中git配置:file -> ttings -> editor -> github,进去改github的账户,如果没有git则不需要.webstorm的插件安装:file ->plugins,然后就选择给力的插件们再安装.(“css-x-fire”插件,用于当使用firebug修改css属性时,编辑器内的css代码也会发生变化。)

webstorm使用心得

webstorm的收藏夹功能:当工程目录很庞大时,有些子目录很经常打开,但层级又很深,这时候可以把目录添加到收藏夹里面,添加成功后,左侧有个“favorites”菜单webstorm的面包屑导航:除了左侧的工程页面,可以选择目录之外,在顶部菜单下有一个类似网站面包屑导航一样的目录也可以实现相同功。点击每there you will be个目录就会有下拉菜单显示其下的子目录,很实用.webstorm的构造器界面:注释符合格式的话就会出现。如果是js文件则是js类的函数和对象;css文件的话则是这个css文件的概括;html文件的话则是节点的结构图。话说这几个就是为了方便查看代码的结构性.webstorm的todo界面:给代码加todo注释就会出现这个界面webstorm的双栏代码界面:右击代码选项卡上的文件,然后右键 -> spilt vertically(左右两屏)或者spilt horizontally(上下两屏)webstorm的本地历史功能:找回代码的好办法

webstorm集成git使用

webstorm中只集成了git的常用操作,并不能完全替代命令行工具。在界面的右下角可以查看处于哪个git分支。也可以在上面点击切换或者新建分支。

查看当前代码与版本库代码的差异:右击代码界面任意区域,选择git -> compare with然后选择要比较的版本库。

webstorm快捷键说明

webstorm的editing编辑相关快捷键

ctrl + space:basic code completion (the name of any class, method or variable) 基本代码完成(任何类、函数或者变量名称),改为alt+sctrl + shift + enter:complete statement 补全当前语句ctrl + p:parameter info (within method call arguments) 参数信息 包括方法调用参数ctrl + mou over codebrief info 简单信息ctrl + f1show description of error or warning at caret 显示光标所在位置的错误信息或者警告信息alt + inrtgenerate code…(getters, tters, constructors)新建一个文件或者生成代码,…构造函数,可以创建类里面任何字段的getter与tter方法ctrl + ooverride methods 重载方法ctrl + iimplement methods 实现方法ctrl + alt + tsurround with…(if, el, try, catch, for, etc)用 * 来围绕选中的代码行,( * 包括 if 、 while 、 try catch 等)ctrl + /comment/uncomment with line comment 行注释/取消行注释ctrl + shift + /comment/uncomment with block comment 块注释/取消块注释ctrl + wlect successively increasing code blocks 选择代码块,一般是增量选择ctrl + shift + wdecrea current lection to previous state 上个快捷键的回退,减量选择代码alt + qcontext info 上下文信息alt + entershow intention actions and quick-fixes 意图行动,快速见效ctrl + alt + lreformat code 根据模板格式对代码格式化tab/ shift + tabindent/unindent lected lines 对所选行进行缩排处理/撤销缩排处理ctrl + x or shift + deletecut current line or lected block to clipboard 剪切当前行或所选代码块到剪切板ctrl + c or ctrl + inrtcopy current line or lected block to chipboard 拷贝当前行或者所选代码块到剪切板ctrl + v or shift + inrtpaste from clipboard 粘贴剪切板上的内容ctrl + shift + vpaste from recent buffers 粘贴缓冲器中最新的内容ctrl + dduplicate current line or lected block 复制当前行或者所选代码块ctrl + ydelete line at caret 删除光标所在位置行ctrl + shift + jsmart line join(html and javascript only)加入智能行 (html 和javascript)ctrl + entersmart line split(html and javascript only)分离智能行 (html 和javascript)shift + enterstart new line 另起一行ctrl + shift + utoggle ca for word at caret or lected block 光标所在位置大小写转换ctrl + shift + ]/[sshigeelect till code block end/start 选择直到代码块结束/开始ctrl + deletedelete to word end 删除文字结束ctrl + backspacedelete to word start 删除文字开始ctrl + numpad+/-expand/collap code block 扩展/缩减代码块ctrl + shift+ numpad+expand all 扩张所有ctrl + shift+ numpad-collap 缩减所有ctrl + f4clo active editor tab 关闭活跃编辑标签

webstorm的arch/replace搜索/替代相关快捷键

ctrl + ffind 当前文件内快速查找代码ctrl + shift + ffind in path 指定文件内寻找路径f3find next 查找下一个shift + f3find previous 查找上一个ctrl + rreplace 当前文件内代码替代ctrl + shift + rreplace in path 指定文件内代码批量替代

webstorm的usage arch搜索相关快捷键

alt + f7/ctrl + f7find usages/find usages in file 找到使用/在文件找到使用ctrl + shift + f7highlight usages in file文件中精彩使用ctrl + alt + f7show usages 显示使用

webstorm的running运行

alt + shift + f10lect configuration and run 选择构架,运行alt + shift + f9lect configuration and debug 选择构架,修补漏洞shift + f10run 运行shift + f9debug 修补漏洞ctrl + shift + f10run context configuration from editor 从编辑运行内容构架ctrl + shift + xrun command line 运行命令行

webstorm的debugging debugging相关快捷键

f8step over 不进入函数f7step into 单步执行shift + f7smart step into 智能单步执行shift + f8step out 跳出alt + f9run to cursor 运行到光标处alt+ f8evaluate expression 评估表达f9resume program 重新开始程序ctrl + f8toggle breakpoint 切换断点ctrl + shift + f8view breakpoints 查看断点

webstorm的navigation 定位相关快捷键

ctrl + ngo to class跳转到指定类ctrl + shift + ngo to file 通过文件名快速查找工程内的文件ctrl + alt +shift + ngo to symbol 通过一个字符查找函数位置alt + right/ leftgo to next/ previous editor tab 进入下一个/ 上一个编辑器选项f12go back to previous tool window 进入上一个工具窗口escgo to editor(from tool window) 从工具窗口进入编辑器shift + eschide active or last active window 隐藏活动窗口ctrl + shift + f4clo active run/message/find/…tab 关闭活动….标签ctrl + ggo to line 跳转到第几行ctrl + erecent files popup 弹出最近打开的文件ctrl + alt + left/rightnavigate back/forward 导航前进/后退ctrl + shift + backspacenavigate to last edit location 向最近编辑定位导航alt + f1lect current file or symbol in any view 查找当前选中的代码或文件在其他界面模块的位置ctrl + b or ctrl + clickgo to declaration跳转到定义处ctrl + alt + bgo to implementation(s) 跳转方法实现处ctrl + shift + bgo to type declaration 跳转方法定义处ctrl + shift + iopen quick definition lookup 打开定义快速查找ctrl + ugo to super-method/super-class 跳转方法/超阶级alt + up/downgo to previous/next method 在方法间快速移动定位ctrl + ]/[move to code block end/start 跳转到编码块结束/开始ctrl + f12file structure popup 文件结构弹出ctrl + htype hierarchy 类型层次全国一本大学一览表ctrl + alt + hcall hierarchy 调用层次结构f2/ shift + f2next/previous highlighted error 跳转到后一个/前一个错误,高亮错误或警告快速定位,使用这个快捷键可以快捷在出错的语句之间进行跳转。f4/ctrl + enteredit source/ view source 编辑源代码/查看源代码alt + homeshow navigation bar 显示导航栏f11toggle bookmark 切换标记ctrl + f11toggle bookmark with mnemonic 采用记忆切换标记ctrl + #[0-9]go to numbered bookmark 跳转到带编号的标记shift + f11show bookmark 显示标记

webstorm的refactoring 重构相关快捷键

f5copy 拷贝f6move 移动alt + deletesafe delete 安全删除shift + f6rename 重新命名ctrl + alt + ninline variable 嵌入变量ctrl + alt + mextract method( javascript only) 提取函数ctrl + alt + vintroduce variable 引入变量ctrl + alt + fintroduce field 引入域ctrl + alt + cintroduce constant 引入常量

在webstorm中vcs/local history 版本控制系统/ 本地历史相关的快捷键

alt + backquote( )‘vcs’quick popup 快速弹出 vcsctrl + kcommit project to vcs 提交项目至vcsctrl + tupdate project from vcs 从vcs 更新项目alt + shift + cview recent changes 查看最新改变

使用webstorm时general 常用的相关快捷键

ctrl + shift +afind action 查找并调用编辑器的功能alt + #[0-9]open corresponding tool window 快速切换打开界面模块ctrl + alt + f11toggle full screen mode 切换全屏模式ctrl + shift + f12toggle maximizing editor 切换最大化编辑器alt + shift + fadd to f别说爱情苦avorites 将当前文件添至收藏夹alt + shift + iinspect current file with current profile 使用当前属性检查当前文件ctrl + backquote( )quick switch current scheme 快速转换现有组合ctrl + alt + sopen tting dialog 打开设置对话框ctrl + tabswitch between tabs and tool window 标签和工具窗的转换(与windows快捷键冲突)

本文发布于:2023-04-05 07:18:32,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/64b7b493a0c95d0fa15ccddbb45928fe.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:webstorm怎么用文本写代码(webstorm使用初步教程).doc

本文 PDF 下载地址:webstorm怎么用文本写代码(webstorm使用初步教程).pdf

标签:代码   文件   快捷键   编辑器
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图