hjzheng / CUF_meeting_knowledge_share

Record CUF team meeting knowledge share
121 stars 49 forks source link

2014-11-25 Sublime Text入门和JQuery Mobile入门 #18

Open hjzheng opened 9 years ago

hjzheng commented 9 years ago

Sublime text使用

Package Control 安装方法

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

Sublime Text2的命令

import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

用Package Control安装插件的方法:

将以下代码加入到Preferences >> Package Settings >> Package Control >> Settings – User 中:

// Proxy Settings
"http_proxy": "your.proxy.fqdn:80",
"https_proxy": "your.proxy.fqdn:80",
"proxy_username": "my_username",
"proxy_password": "my_password",

插件推荐 Package Control

快捷键 功能
Ctrl+L 选择整行(按住-继续选择下行)
Ctrl+KK 从光标处删除至行尾
Ctrl+Shift+K 删除整行
Ctrl+Shift+D 复制光标所在整行,插入在该行之前
Ctrl+J 合并行(已选择需要合并的多行时)
Ctrl+KU 改为大写
Ctrl+KL 改为小写
Ctrl+D 选词(按住-继续选择下个相同的字符串)
Ctrl+M 光标移动至括号内开始或结束的位置
Ctrl+Shift+M 选择括号内的内容(按住-继续选择父括号)
Ctrl+/ 注释整行(如已选择内容,同“Ctrl+Shift+/”效果)
Ctrl+Shift+/ 注释已选择内容
Ctrl+Space 自动完成(win与系统快捷键冲突,需修改)
Ctrl+Z 撤销
Ctrl+Y 恢复撤销
Ctrl+Shift+V 粘贴并自动缩进(其它兄弟写的,实测win系统自动缩进无效)
Ctrl+M 光标跳至对应的括号
Alt+. 闭合当前标签
Ctrl+Shift+A 选择光标位置父标签对儿
Ctrl+Shift+[ 折叠代码
Ctrl+Shift+] 展开代码
Ctrl+KT 折叠属性
Ctrl+K0 展开所有
Ctrl+U 软撤销
Ctrl+T 词互换
Ctrl+Enter 插入行后
Ctrl+Shift+Enter 插入行前
Ctrl+K+Backspace 从光标处删除至行首
Ctrl+Shift+UP 与上行互换
Ctrl+Shift+DOWN 与下行互换
Shift+Tab 去除缩进
Tab 缩进
F9 行排序(按a-z)

视频教程

hjzheng commented 9 years ago

jquery mobile

Introduction

Pages, Header and Footer

Form

List View

Collapsible Blocks

Slide Panel

Popup

Theme

Icon

Ajax Page Navigation

Transition Animation

Configuration

// change mobile configuration
$(document).bind("mobileinit", function() {
    $.mobile.property=“propertyValue";
});
name use
ns Namespace for data attribute
activeBtnClass css class for buttons in active status
activePageClass css class for pages currently being reviewed
ajaxEnabled Whether to use ajax for page loading and form submission or not
allowCrossDomainPages A security setting for load remote pages
autoInitializePage Initialize page on load or not
defaultDialogTransition How to show dialogs
defaultPageTransition How to show pages
gradea Determine whether it is a “good” browser
hasListeningEnabled Listen to the change of location.hash property or not
ignoreContentEnabled Disable jQuery Mobile auto enhancement
linkBindingEnabled Listen to the link click or not
loadingMessage The message for loading
loadingMessageTextVisible Show the loading message or not
loadingMessageTheme The theme for page loading dialog
minScrollBack Remember the last position of page scroll
pageLoadErrorMessage The message for loading error
pageLoadErrorMessageTheme Show the loading error message or not
pushStateEnabled Use html5 pushState function or hash based
changed for page navigation
subPageUrlKey Customize the prefix for page url

Utilities - Page

hjzheng commented 9 years ago

JQuery Mobile Example: https://github.com/hjzheng/CUF_meeting_knowledge_share/tree/master/2014-11-25/jquery_mobile_example/code

hjzheng commented 8 years ago

Sublime Text MAC 快捷键 shift + cmd + p 打开命令面板 control + ` 控制台 cmd + n 新建标签 cmd + 数字 标签切换 cmd + option + 2 分成两屏 control + 数字 分屏时移动到不同的屏幕 cmd + delelte 删除光标前所有字符, 貌似是Mac快捷键 cmd + f 查找 option + cmd + f 查找替换 cmd + t 文件跳转 control + g 行跳转, 类似vim中的num + gg cmd + r 函数跳转 cmd + / 给选中行添加或去掉注释 cmd + [或 cmd + ] 智能行缩进 cmd + k + b 开关侧边栏