自动完成代码,提高工作效率

编程技术  /  houtizong 发布于 2年前   89

做项目时,我们都是手写代码,但是这样效率不高,如果有自动完成代码功能是不是更好呢?

一:Editplus自动完成功能

当你要插入一个有Class的DIV时,你要输出很多代码<div class=""><div>,有没有更快的方法呢?你是否希望当你在某个编辑器里输入:divc然后空格就就出现 <div class=""><div>,而且光标就显示在“”里面,Editplus就有这样的功能,不过这种预定义功能需要自己写,一般网上可以找到,也可以自己写,在:设置-》参数-》文件-》设置&语法,然后再选择相应语言的自动完成选项,然后载入自己完成文件,前端选沟重新启动就可以使用了(先将自动完成文件放到安装目录下面)。

例如:

当你在HTML里面输入:

html5+空格

<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<title>New Document</title>
</head>
<body>

输入:ltie7+空格

输出:

<!--[if lt IE 7]>
^!
<![endif]-->

输入:ul4+空格

输出:

#T=ul4
<ul>
 <li>^!</li>
 <li></li>
 <li></li>
 <li></li>
</ul>

很方便的,下面是我使用的HTML自动完成文件,你自己也可以修改。

#TITLE=HTML; EditPlus Auto-completion file v1.0 written by Kingwell.; This file is provided as a default auto-completion file for HTML; Author   : Kingwell; Email    : kingwell.leng#gmail.com; Version  : v1.2; update   : http://#CASE=n#T=ifie<!--[if IE]>^!<![endif]-->#T=ltie7<!--[if lt IE 7]>^!<![endif]-->#T=html5<!doctype html><html lang=""><head><meta charset="utf-8"><title>New Document</title></head><body>^!</body></html>#T=html1.0s<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang=""><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>New Document</title></head><body>^!</body></html>#T=html1.0t<!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"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>New Document</title></head><body>^!</body></html>#T=html<!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"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>New Document</title></head><body>^!</body></html>#T=html4.01t<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>New Document</title></head><body>^!</body></html>#T=html4.01s<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>New Document</title></head>^!<body></body></html>#T=htmlm<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>New Document</title></head><body>^!</body></html>#T=doctype<!doctype html>#T=doc<!doctype html>#T=script<script type="text/javascript">^!</script>#T=js<script type="text/javascript">^!</script>#T=script:src<script type="text/javascript" src="^!"></script>#T=style<style type="text/css">^!</style>#T=link<link rel="stylesheet" type="text/css" href="^!">#T=css<style type="text/css">^!</style>#T=zs<!-- ^! -->#T=zs5<!----- ^! ----->#T=zs10<!---------- ^! ---------->#T=h1<h1>^!</h1>#T=h1i<h1 id="^!"></h1>#T=h1c<h1 class="^!"></h1>#T=h1ic<h1 id="^!" class=""></h1>#T=h2<h2>^!</h2>#T=h2i<h2 id="^!"></h2>#T=h2c<h2 class="^!"></h2>#T=h1ic<h2 id="^!" class=""></h2>#T=h3<h3>^!</h3>#T=h3i<h3 id="^!"></h3>#T=h3c<h3 class="^!"></h3>#T=h3ic<h3 id="^!" class=""></h3>#T=h4<h4>^!</h4>#T=h4i<h4 id="^!"></h4>#T=h4c<h4 class="^!"></h4>#T=h4ic<h4 id="^!" class=""></h4>#T=h5<h5>^!</h5>#T=h5i<h5 id="^!"></h5>#T=h5c<h5 class="^!"></h5>#T=h5ic<h5 id="^!" class=""></h5>#T=h6<h6>^!</h6>#T=h6i<h6 id="^!"></h6>#T=h6c<h6 class="^!"></h6>#T=h6ic<h6 id="^!" class=""></h6>#T=**/**************************************************/^!#T=ul<ul> <li>^!</li></ul>#T=ul2<ul> <li>^!</li> <li></li></ul>#T=ul3<ul> <li>^!</li> <li></li> <li></li></ul>#T=ul4<ul> <li>^!</li> <li></li> <li></li> <li></li></ul>#T=ul5<ul> <li>^!</li> <li></li> <li></li> <li></li> <li></li></ul>#T=ulia<ul> <li><a href="^!" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li></ul>#T=u#lia<ul id="^!"> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li> <li><a href="" title=""></a></li></ul>#T=a<a>^!</a>#T=ab<abbr>^!</abbr><acronym><address><applet><area><article><aside><audio><b><base><basefont><bdi><bdo><big><blockquote><body>#T=br<br />^!#T=button<button>^!</button>#T=canvas<canvas id="^!"></canvas>#T=<caption><center><cite><code><col><colgroup><command><datalist><dd><del><details><dfn><dir>#T=div<div>^!</div>#T=divi<div id="^!"></div>#T=divc<div class="^!"></div>#T=divic<div id="^!" class=""></div>#T=dl<dl>#T=dt  <dt>^!</dt>#T=dd    <dd>^!</dd>#T=em<em>^!</em>#T=embed<embed>^!</embed>#T=fieldset<fieldset>    <legend>^!</legend></fieldset>#T=fig<figcaption>^!</figcaption>#T=figcaption<figcaption>^!</figcaption>#=figure<figure><figcaption>^!</figcaption></figure>#T=font<font>^!</font>#T=footer<footer>^!</footer>#T=form<form action="^!"></form>#T=frame<frame>^!</frame>#T=frameset<frameset>^!</frameset>#T=head<head>^!</head>#T=header<header>^!</header>#T=hgroup<hgroup>^!</hgroup>#T=hr<hr>^!</hr>#T=i<i>^!</i>#T=iframe<iframe>^!</iframe>#T=if<iframe>^!</iframe>#T=img<img src="^!" alt="" title="">#T=image<img src="^!" alt="" title="">#T=input:file<input type="file" name="^!"/>#T=input:filec<input type="file" class="^!" name=""/>#T=input:filei<input type="file" id="^!" name=""/>#T=input:fileic<input type="file" id="^!" class="" name=""/>#T=input:checkbox<input type="checkbox" name=""/>#T=input:radio<input type="radio" name=""/>#T=input:text<input type="text" name="" />#T=input:textc<input type="text" class="^!" />#T=input:texti<input type="text" id="^!" />#T=input:textic<input type="text" id="^!" class="" />#T=input:submit<input type="submit" name="^!"/>#T=input:submitc<input type="submit" class="^!" name=""/>#T=input:submiti<input type="submit" id="^!" name=""/>#T=input:submitic<input type="submit" id="^!" class="" name=""/>#T=input:reset<input type="reset" />#T=input:password<input type="password" name="^!" />#T=input:passwordc<input type="password" class="^!" name="" />#T=input:passwordi<input type="password" id="^!" class="" name="" />#T=input:passwordic<input type="password" id="^!" class="" name="" />#T=input:button<input type="button" name="^!"/>#T=input:buttonc<input type="button" class="^!" name=""/>#T=input:buttoni<input type="button" id="^!" name=""/>#T=input:buttonic<input type="button" id="^!" class="" name=""/>#T=input:image<input type="image" name="^!" />#T=input:imagec<input type="image" class="^!" name="" />#T=input:imagei<input type="image" id="^!" name="" />#T=input:imageic<input type="image" id="^!" class="" name="" />#T=textarea<textarea>^!</textarea>#T=textareac<textarea class="^!"></textarea>#T=textareai<textarea id="^!"></textarea>#T=textareaic<textarea id="^!" class=""></textarea>#T=ins<ins>#T=keygen<keygen name="^!"/><kbd>#T=label<label for="^!"></label>#T=legend<legend>^!</legend>#T=li<li>^!</li>#T=map<map>^!</map>#T=mark<mark>^!</mark>#T=menu<menu>^!</menu>#T=meta<meta ^!/>#T=nav<nav>^!</nav>#T=navc<nav class="^!"></nav>#T=navi<nav id="^!"></nav>#T=navic<nav id="^!" class=""></nav><noframes>#T=noscript<noscript>^!</noscript>#T=object<object>^!</object>#T=ol<ol>^!</ol>#T=optgroup<optgroup>^!</optgroup>#T=option<option>^!</option><output>#T=p<p>^!</p>#T=pc<p class="^!"></p>#T=pi<p id="^!"></p>#T=pic<p id="^!" class=""></p>#T=parem<param><pre><progress><q><rp><rt><ruby><s>#T=samp<samp>^!</samp><script>#T=section<section>^!</section>#T=select<select>    <option>^!</option></select>#T=select2<select>    <option>^!</option>    <option></option></select>#T=select3<select>    <option>^!</option>    <option></option>    <option></option></select>#T=select4<select>    <option>^!</option>    <option></option>    <option></option>    <option></option></select>#T=select5<select>    <option>^!</option>    <option></option>    <option></option>    <option></option>    <option></option></select>#T=select10<select>    <option>^!</option>    <option></option>    <option></option>    <option></option>    <option></option>    <option></option>    <option></option>    <option></option>    <option></option>    <option></option></select>#T=small<small>^!</small>#T=source<source>^!</source>#T=span<span>^!</span>#T=spanc<span class="^!"></span>#T=spani<span id="^!"></span>#T=strike<strike>^!</strike>#T=strong<strong>^!</strong>#T=strongc<strong class="c"></strong>#T=strongi<strong id="^!"></strong>#T=sub<sub>^!</sub>#T=summary<summary></summary>#T=sup<sup>^!</sup>#T=table<table>    <tr><td>^!</td>    </tr></table>#T=tablec<table class="^!">    <tr><td></td>    </tr></table>#T=tablei<table class="^!">    <tr><td></td>    </tr></table>#T=tableic<table id="^!" class="">    <tr><td></td>    </tr></table>#T=tbody<tbody>^!</tbody>#T=td<td>!</td>#T=tfoot<tfoot>^!</tfoot>#T=th<th>^!</th>#T=thead<thead>^!</thead>#T=time<time>^!</time>#T=title<title>^!</title>#T=tr<tr>^!</tr>#T=u<u>^!</u>#T=ul<ul>    <li>^!</li></ul>#T=var<var>^!</var>#T=video<video src="^!" controls="controls">#T=wbr<wbr>^!

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!

留言需要登陆哦

技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成

网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];

      订阅博客周刊 去订阅

文章归档

文章标签

友情链接

Auther ·HouTiZong
侯体宗的博客
© 2020 zongscan.com
版权所有ICP证 : 粤ICP备20027696号
PHP交流群 也可以扫右边的二维码
侯体宗的博客