MarkDown语法记笔记



1.下载&&安装


2.Sublime Text 便捷技巧

[以PHP为例]

1).快捷键键入当前时间:

  • 快捷键绑定[Preferences-->Key Binding--User]:{"keys":["ctrl+t"], "command":"add_current_time"}
  • 代码:保存为\Packages\User\addCurrentTime.py
  1. import datetime
  2. import sublime_plugin
  3. class AddCurrentTimeCommand(sublime_plugin.TextCommand):
  4. def run(self, edit):
  5. self.view.run_command("insert_snippet",
  6. {
  7. "contents": "%s" % datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  8. }

2).安装PHP语法提示:

  • 工具栏:Preferences->Package Settings->SublimeLinter->Settings - User
  1. {"sublimelinter": true,
  2. "sublimelinter_executable_map":
  3. {
  4. "php":"D:\\amp\\php\\php.exe" #把左边的地址替换为你实际的php.exe的地址
  5. }
  6. }

3).Ctrl+b在浏览器中打开文件【假设你已经装了Apache或者Nginx等服务器,且你的www目录为C:\www\】

  • 快捷键绑定:{ "keys": ["ctrl+b"], "command": "open_browser" }[www是你localhost的真实指向]
  • 编辑sublime Text/Data/Packages/User/open_broswer.py
  1. url_map = {
  2. 'D:\\www\\' : 'http://localhost/',
  3. }

4).快捷键生成代码模板[Data\Packages\SublimeTmpl\templates\php.tmpl]

【${1:}--当快速创建完文件后,鼠标将第一定位在此处;按下tab键,跳到${2:}...最后定位${0}】

  • ctrl+alt+h==>html
  • ctrl+alt+j==>javascript
  • ctrl+alt+c==>css
  • ctrl+alt+p==>php
  • ctrl+alt+r==>ruby
  • ctrl+alt++shift+p==>python
  1. <?php
  2. /**
  3. * @authors : MinsonLee (694246631@qq.com)
  4. * @blog : http://www.cnblogs.com/lms520/
  5. * @date : ${date}
  6. * @description: ${1:}
  7. * @source :
  8. * @version : \$Id\$
  9. */
  10. class ${2:ClassName} ${3:extends ${4:AnotherClass}} {
  11. $5
  12. function __construct(){
  13. $0
  14. }
  15. }

5).自定义代码模板方法2

编辑:\Data\Packages\PHP\php.sublime-snippet文件(xml方式)

  1. <snippet>
  2. <content><![CDATA[<?${TM_PHP_OPEN_TAG:php}
  3. /**
  4. * @authors : MinsonLee [email:694246631@qq.com]
  5. * @blog : http://www.cnblogs.com/lms520/
  6. * @date : $1
  7. * @description: $2
  8. * @source : $3
  9. * @version : Version-$4
  10. */
  11. $0
  12. ]]></content>
  13. <tabTrigger>php</tabTrigger>
  14. <scope>text.html - source.php</scope>
  15. <description>&lt;?php ?&gt;</description>
  16. </snippet>

3.Sublime Text 常用快捷键【更新中...】

只写常用但比较少见的,常用的可以百度~

代码

  • ctrl+shift+[ 折叠代码
  • ctrl+shift+] 展开代码
  • ctrl+shift+up 与上行互换
  • ctrl+shift+down 与下行互换
  • ctrl+j 合并行【用来写JavaScript的数组或者是PHP里面的数组简直逆天】
  • ctrl+d 选择相同的单词
  • ctrl+/ 注释整行(如已选择内容,同“ctrl+shift+/”效果)
  • ctrl+shift+/ 注释已选择内容
  • ctrl+ku 改为大写
  • ctrl+kl 改为小写
  • Ctrl+Shift+M 选中花括号里面的全部内容不包括{}
  • alt+.               快速关闭HTML标签:例如,现在有个<div>只需要按下该快捷键,可以快速闭合</div>
  • ctrl+shift+v     完整拷贝,避免格式发生错乱(感觉这个对写前端很有用)

属性:

  • ctrl+kt 折叠属性
  • ctrl+k0 展开所有
  • ctrl+enter 插入行后
  • ctrl+shift+enter 插入行前
  • ctrl+shift+a 选择光标位置父标签对儿

行:

  • ctrl+l 选择整行(按住-继续选择下行)
  • ctrl+kk 从光标处删除至行尾
  • ctrl+shift+k 删除整行
  • ctrl+shift+d 复制光标所在整行,插入在该行之前
  • shift+tab 去除缩进
  • tab 缩进

4.Sublime Text 装逼神技能

1). 字体设置

  • 最帅的编程字体:点击Yahei Consolas Hybrid下载,双击安装
  • 设置字体:Preferences->Settings-User
  1. {
  2. "font_options":
  3. [
  4. "no_bold",/* 不是粗体显示*/
  5. "no_italic", /*不是斜体*/
  6. "no_antialias", /*无反图像灰度值失真显示*/
  7. "gray_antialias",/*反图像灰度值失真显示*/
  8. ],
  9. "font_face": "YaHei Consolas Hybrid",
  10. "font_size": 15
  11. }

2).打开侧栏,显示目录树:
View-->Side Bar-->show side bar【直接将你想的目录拖放进来,就可以看到你的目录了】

3).F9 行排序(按a-z)


10.插件推荐(不定期更新,点击链接可查看具体安装及用法):

1)MarkPreview【对于喜欢用markdown语法写东西的人来说,这个挺不错的】

**待更新中,也欢迎大家补充....**

**转载请保留博主连接**

*:first-child {
margin-top: 0 !important;
}

body>*:last-child {
margin-bottom: 0 !important;
}

/* BLOCKS
=============================================================================*/

p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}

/* HEADERS
=============================================================================*/

h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}

h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}

h1 {
font-size: 28px;
color: #000;
}

h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}

h3 {
font-size: 18px;
}

h4 {
font-size: 16px;
}

h5 {
font-size: 14px;
}

h6 {
color: #777;
font-size: 14px;
}

body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}

h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}

/* LINKS
=============================================================================*/

a {
color: #4183C4;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

/* LISTS
=============================================================================*/

ul, ol {
padding-left: 30px;
}

ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}

ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}

dl {
padding: 0;
}

dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}

dl dt:first-child {
padding: 0;
}

dl dt>:first-child {
margin-top: 0px;
}

dl dt>:last-child {
margin-bottom: 0px;
}

dl dd {
margin: 0 0 15px;
padding: 0 15px;
}

dl dd>:first-child {
margin-top: 0px;
}

dl dd>:last-child {
margin-bottom: 0px;
}

/* CODE
=============================================================================*/

pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}

code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}

pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}

pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}

pre code, pre tt {
background-color: transparent;
border: none;
}

kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}

/* QUOTES
=============================================================================*/

blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}

blockquote>:first-child {
margin-top: 0px;
}

blockquote>:last-child {
margin-bottom: 0px;
}

/* HORIZONTAL RULES
=============================================================================*/

hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}

/* TABLES
=============================================================================*/

table th {
font-weight: bold;
}

table th, table td {
border: 1px solid #ccc;
padding: 6px 13px;
}

table tr {
border-top: 1px solid #ccc;
background-color: #fff;
}

table tr:nth-child(2n) {
background-color: #f8f8f8;
}

/* IMAGES
=============================================================================*/

img {
max-width: 100%
}
-->

Sublime Text 3专题的更多相关文章

  1. Sublime Text 3中文乱码解决方法以及安装包管理器方法

    一般出现乱码是因为文本采用了GBK编码格式,Sublime Text默认不支持GBK编码. 安装包管理器 简单安装 使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令 ...

  2. 在Sublime Text 3上安装代码格式化插件CodeFormatter

    1.了解CodeFormatter插件 在Sublime Text 3中编写代码,为了能让我们的代码格式变得漂亮整洁,需要一个能自动格式代码的插件.这里发现CodeFormatter插件不错,它能支持 ...

  3. sublime text 3 + python配置,完整搭建及常用插件安装

    四年的时间,一直使用EmEditor编辑器进行Python开发,之前是做面向过程,只需要将一个单独的py文件维护好即可,用着也挺顺手,但是最近在做面向对象的开发,不同的py文件中相互关联较多,感觉单纯 ...

  4. 前端工程师手中的Sublime Text

    原文地址:http://css-tricks.com/sublime-text-front-end-developers/ 我的Blog:http://cabbit.me/sublime-text-f ...

  5. Sublime Text 全程指引 by Lucida

    作者:Lucida 微博:@peng_gong 豆瓣:@figure9 博客园:@figure9 原文链接:http://zh.lucida.me/blog/sublime-text-complete ...

  6. 自定义Sublime Text的图标

    sublime text很赞,windows上最接近mac逼格的轻量编辑器,对于我这样比较喜欢格调的人来说,简直不二之选啊. 美中不足的是,看久了觉得它的图标似乎不是很上心.现在都流行扁平化了而它还停 ...

  7. 如何优雅地使用Sublime Text

    Sublime Text:一款具有代码高亮.语法提示.自动完成且反应快速的编辑器软件,不仅具有华丽的界面,还支持插件扩展机制,用她来写代码,绝对是一种享受.相比于难于上手的Vim,浮肿沉重的Eclip ...

  8. 为 Sublime Text 3059 配置 PHP 编译环境

    关于  Sublime Text 3059 的安装及汉化 请参看 http://www.xiumu.org/note/sublime-text-3.shtml 为 sublime Text 配置 PH ...

  9. 杂谈:用 Sublime Text 2 写 ActionScript3

    Sublime Text这是程序员最喜爱的编辑器,说说在win7下使用Sublime Text来编写as文件以及编译与运行swf. 准备工作 1.Sublime Text 2 2.Java 的JDK( ...

随机推荐

  1. jquery from提交和post提交

    //from 提交 function login(){    $('#login_form').form('submit',{              url: '../../../bagechux ...

  2. 关于Intent的七大重要属性

    在Android 中,Intent用来封装两个Activity之间的调用意图,实现两个Activity之间的跳转,并传递信息. Intent的七大重要属性:ComponentName Action   ...

  3. php emoji处理微信表情

    使用 https://github.com/iamcal/php-emoji 添加下面的函数到代码中 function utf8_bytes($cp){ if ($cp > 0x10000){ ...

  4. Sum All Primes

    function sumPrimes(num) { //return num; var arr = []; var ifPrime = function(num){ if(num < 2){ r ...

  5. JavaScript之作用域和引用类型

    学习js高级程序设计第四.五章 4.1基本类型和引用类型的值:基本类型值指的是简单的数据段,引用类型值指可能由多个值构成的对象. 引用类型的值是保存在内存中的对象,不能直接访问,而是按引用访问(类似指 ...

  6. Daily Scrum 12.14

    今日完成任务: 优化了问题页面显示问题的算法:两名开发人员有CCF考试,今天没有完成任务,任务顺延到明天. 明日任务: 黎柱金 解决资源显示全部为同一个PDF的BUG 晏旭瑞 资源搜索问题 孙思权 做 ...

  7. <head></head>

    <!DOCTYPE html><html lang="en"><head>    <meta charset="utf-8&qu ...

  8. PoEduo - C++阶段班【Po学校】-Lesson03-5_运算符重载- 第7天

    PoEduo - Lesson03-5_运算符重载- 第7天 复习前面的知识点 空类会自动生成哪些默认函数 6个默认函数    1  构造  2  析构   3  赋值  4 拷贝构造  5 oper ...

  9. [php-src]Php扩展的内存泄漏处理思路

    内容均以php5.6.14为例. 一. 封装函数时产生 memory leaks. [weichen@localhost www]$ php .php [,] [Tue Jul :: ] Script ...

  10. Hadoop入门之安装配置(hadoop-0.20.2)

    Hadoop,简单理解为HDFS(分布式存储)+Mapreduce(分布式处理),专为离线和大规模数据分析而设计. Hadoop可以把很多linux的廉价PC组成分布式结点,然后编程人员也不需要知道分 ...