现在的位置: 首页 > 综合 > 正文

几个 Editplus 实用用户工具集

2012年06月10日 ⁄ 综合 ⁄ 共 5517字 ⁄ 字号 评论关闭

1、CSS自动完成文件

将下面的保存为 CSS.ACP,然后在设置里面指定即可,我只加了自己常用的一些属性,你可以自行扩展。

 

代码

#TITLE=Css
; EditPlus Auto-completion file v1.0 written by matin0728@gmail.com, QQ 5364241 沙加 - 博客园
; This file
is provided as a default auto-completion file for Java and C#.

#CASE=y

#T=b
background:^!;
#T=bi
background-image:^!;
#T=bp
background-position"^!;
#T=bc
background-color:^!;
#T=fl
float:left;
#T=fr
float:right;
#T=of
overflow:hidden;
#T=z
zoom:1;
#T=d
display:^!;
#T=db
display:block;
#T=dn
display:none;
#T=fw
font-weight:^!;
#T=fs
font-size:^!;
#T=h
height:^!;
#T=w
width:^!;
#T=lh
line-height:^!;
#T=c
color:^!;
#T=fs
font-size:^!;
#T=p
padding:^!;
#T=pt
padding-top:^!;
#T=pb
padding-bottom:^!;
#T=pl
padding-left:^!;
#T=pr
padding-right:^!;
#T=m
margin:^!;
#T=mt
margin-top:^!;
#T=ml
margin-left:^!;
#T=mr
margin-right:^!;
#T=mb
margin-bottom:^!;
#T=rbt
-moz-border-radius-topleft:5px;-moz-border-radius-topright:5px;-webkit-border-radius-topleft:5px;-webkit-border-radius-topright:5px;
#T=rbb
-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;-webkit-border-radius-bottomleft:5px;-webkit-border-radius-bottomright:5px;
#T=rb
-moz-border-radius:5px;-webkit-border-radius:5px;
#T=ta
text-align:^!;
#T=tal
text-align:left;
#T=tar
text-align:right;
#T=tac
text-align:center;
#T=ti
text-indent:^!;
#T=v
visibility:hidden;
#T=ps
position:^!;
#T=psr
position:relative;
#T=psa
position:absolute;
#

 

 

2、Sparkup 的Editplus  移植版

如果你不知道 Sparkup 用来做什么,可以去看看 Zencoding

使用这个工具需要本机安装Python的执行环境,注意还需要修改环境变量把python.exe的目录加到PATH里面去,并导入win32的剪帖板包,具体可以看这里 

 

相对于原始的那个 sparkup, 我略作了修改,好让它在console  里面使用参数调用,将下面这个保存到 spark.py 文件

 

 

代码

#!/usr/bin/env python
#
-*- coding: utf-8 -*-
version = "0.1.3"

import os
import fileinput
import getopt
import sys
import re
import win32clipboard, win32con

# ===============================================================================

class Dialect:
shortcuts
= {}
synonyms
= {}
required
= {}
short_tags
= ()

class HtmlDialect(Dialect):
shortcuts
= {
'cc:ie': {
'opening_tag': '<!--[if IE]>',
'closing_tag': '<![endif]-->'},
'cc:ie6': {
'opening_tag': '<!--[if lte IE 6]>',
'closing_tag': '<![endif]-->'},
'cc:ie7': {
'opening_tag': '<!--[if lte IE 7]>',
'closing_tag': '<![endif]-->'},
'cc:noie': {
'opening_tag': '<!--[if !IE]><!-->',
'closing_tag': '<!--<![endif]-->'},
'html:4t': {
'expand': True,
'opening_tag':
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n' +
'<html lang="en">\n' +
'<head>\n' +
' ' + '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'html:4s': {
'expand': True,
'opening_tag':
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n' +
'<html lang="en">\n' +
'<head>\n' +
' ' + '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'html:xt': {
'expand': True,
'opening_tag':
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n' +
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n' +
'<head>\n' +
' ' + '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'html:xs': {
'expand': True,
'opening_tag':
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n' +
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n' +
'<head>\n' +
' ' + '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'html:xxs': {
'expand': True,
'opening_tag':
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' +
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n' +
'<head>\n' +
' ' + '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'html:5': {
'expand': True,
'opening_tag':
'<!DOCTYPE html>\n' +
'<html lang="en">\n' +
'<head>\n' +
' ' + '<meta charset="UTF-8" />\n' +
' ' + '<title></title>\n' +
'</head>\n' +
'<body>',
'closing_tag':
'</body>\n' +
'</html>'},
'input:button': {
'name': 'input',
'attributes': { 'class': 'button', 'type': 'button', 'name': '', 'value': '' }
},
'input:password': {
'name': 'input',
'attributes': { 'class': 'text password', 'type': 'password', 'name': '', 'value': '' }
},
'input:radio': {
'name': 'input',
'attributes': { 'class': 'radio', 'type': 'radio', 'name': '', 'value': '' }
},
'input:checkbox': {
'name': 'input',
'attributes': { 'class': 'checkbox', 'type': 'checkbox', 'name': '', 'value': '' }
},
'input:file': {
'name': 'input',
'attributes': { 'class': 'file', 'type': 'file', 'name': '', 'value': '' }
},
'input:text': {
'name': 'input',
'attributes': { 'class': 'text', 'type': 'text', 'name': '', 'value': '' }
},
'input:submit': {
'name': 'input',
'attributes': { 'class': 'submit', 'type': 'submit', 'value': '' }
},
'input:hidden': {
'name': 'input',
'attributes': { 'type': 'hidden', 'name': '', 'value': '' }
},
'script:src': {
'name': 'script',
'attributes': { 'src': '' }
},
'script:jquery': {
'name': 'script',
'attributes': { 'src': 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' }
},
'script:jsapi': {
'name': 'script',
'attributes': { 'src': 'http://www.google.com/jsapi' }
},
'script:jsapix': {
'name': 'script',
'text': '\n google.load("jquery", "1.3.2");\n google.setOnLoadCallback(function() {\n \n });\n'
},
'link:css': {
'name': 'link',
'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'all' },
},
'link:print': {
'name': 'link',
'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'print' },
},
'link:favicon': {
'name': 'link',
'attributes': { 'rel': 'shortcut icon', 'type': 'image/x-icon', 'href': '' },
},
'

抱歉!评论已关闭.