Home >Web Front-end >HTML Tutorial >前端入门(二)_html/css_WEB-ITnose

前端入门(二)_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:15:321123browse

一款好用的编辑器Sublime

安装

1、下载下载网址http://lucifr.com/2011/08/31/sublime-text-2-tricks-and-tips/2、安装插件包Package Control方法1、按 Ctrl+`(就是~这个键) 复制下面的代码 确认 重新启动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;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())

方法2、下载[Package Control]的安装包http://sublime.wbond.net/Package%20Control.sublime-package点击菜单栏preference下面的Preference--Browse Packages--退回上一层文件夹-打开Installed Packages--复制进去3、安装插件步骤:1、快捷键Ctrl+Shift+p打开Package Control2、输入Install Package回车,输入插件名称比如Emmet4、插件推荐Alignment :主要用于代码对齐AutoFileName:快捷输入文件名Bracket Highlighter:代码匹配ConvertToUTF8:文件转码成utf-8Emmet:编码快捷键,很强大哦HTML/CSS/JS Prettify :格式化HMTL/CSS/JSJsFormat:Javascript的代码格式化插件Js Minifier:一款基于Google Closure compiler压缩Js文件插件LESS:LESS高亮插件PhpTidy:格式化phpSFTP:sftp上传SublimeCodeIntel:代码提示SublimeTmpl:模板插件ColorPicker:调色板...ps:每次安装完插件需要重启编辑器才能看到新安装的插件4、常用快捷键(部分建立在插件安装的基础上)1、Ctrl+Alt+h新建一个html文件(Ctrl+Alt+,可以是h、p、c、j等分别对应html、php、css、js文件2、在新建的页面中输入!,然后回车可以建好一个html文件的主要框架,还有多种类似的快捷方式请搜索emmet快捷键3、选中你想要修改的文字,然后重复Ctrl+D就可以选中页面中所有相同的文字4、按住Ctrl,鼠标光标可以放在多个你想要修改或者添加文字的地方5、Ctrl+F查找6、Ctrl+W关闭当前页7、Ctrl+Shift+T打开刚刚关闭的页面...5、Sftp上传1、安装SFTP插件2、左侧Folders栏中→选择项目文件夹→右键点击Sftp→点击Map to Remote→会新生成一个json格式的文件3、部分修改sftp-config.json文件

{    // The tab key will cycle through the settings when first created    // Visit http://wbond.net/sublime_packages/sftp/settings for help    // sftp, ftp or ftps    "type": "sftp",    "save_before_upload": true,    "upload_on_save": false,    "sync_down_on_open": false,    "sync_skip_deletes": false,    "sync_same_age": true,    "confirm_downloads": false,    "confirm_sync": true,    "confirm_overwrite_newer": false,    "host": "example.com",    "user": "username",    //"password": "password",    //"port": "22",    "remote_path": "/example/path/",    "ignore_regexes": [        "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",        "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",        "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"    ],    //"file_permissions": "664",    //"dir_permissions": "775",    //"extra_list_connections": 0,    "connect_timeout": 30,    //"keepalive": 120,    //"ftp_passive_mode": true,    //"ftp_obey_passive_host": false,    //"ssh_key_file": "~/.ssh/id_rsa",    //"sftp_flags": ["-F", "/path/to/ssh_config"],    //"preserve_modification_times": false,    //"remote_time_offset_in_hours": 0,    //"remote_encoding": "utf-8",    //"remote_locale": "C",    //"allow_config_upload": false,}

upload_on_save:改为true是保存文件时会自动上传到服务器host:改为自己想要上传的域名user、password、port:用户名、密码、端口remote_path:上传路径

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn