豆腐di青春

Front End Engineer

0%

常用的插件:

  1. Package Control

    功能:安装包管理
    简介:sublime插件控制台,提供添加、删除、禁用、查找插件等功能

    安装方法:
    CTRL+` ,出现控制台
    粘贴以下代码至控制台

    1
    import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
  2. Emmet

    功能:编码快捷键,前端必备
    简介:Emmet作为zen coding的升级版,对于前端来说,可是必备插件,如果你对它还不太熟悉,可以在其官网(http://docs.emmet.io/)上看下具体的演示视频。

  3. JSFormat

    简介:指示代码中插入、修改、删除的地方

  4. LESS

    LESS高亮插件

  5. BracketHighlighter

  6. git

  7. Doc​Blockr

  8. Color​Picker

    功能:调色板
    简介:需要输入颜色时,可直接选取颜色
    使用:快捷键Windows: ctrl+shift+c

  9. ConvertToUTF8

  10. AutoFileName

  11. gitGutter

    简介:指示代码中插入、修改、删除的地方

  12. MarkdownEditing

jsx支持

  1. babel

    支持ES6, React.js, jsx代码高亮,对 JavaScript, jQuery 也有很好的扩展
    配置:

    1. 打开.js, .jsx 后缀的文件;

    2. 打开菜单view, Syntax -> Open all with current extension as… -> Babel -> JavaScript (Babel),选择babel为默认 javascript 打开syntax

  2. 修改 Emmet 兼容jsx 文件

    使用方法:
    打开 preferences -> Key bindings - Users,把下面代码复制到[]内部。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    {
    "keys": [
    "super+e"
    ],
    "args": {
    "action": "expand_abbreviation"
    },
    "command": "run_emmet_action",
    "context": [{
    "key": "emmet_action_enabled.expand_abbreviation"
    }]
    },
    {
    "keys": ["tab"],
    "command": "expand_abbreviation_by_tab",
    "context": [{
    "operand": "source.js",
    "operator": "equal",
    "match_all": true,
    "key": "selector"
    }, {
    "key": "preceding_text",
    "operator": "regex_contains",
    "operand": "(\\b(a\\b|div|span|p\\b|button)(\\.\\w*|>\\w*)?([^}]*?}$)?)",
    "match_all": true
    }, {
    "key": "selection_empty",
    "operator": "equal",
    "operand": true,
    "match_all": true
    }]
    }
  3. JsFormat 格式化 js 代码

    使用:
    打开preferences -> Package Settings -> JsFormat -> Setting - Users,输入以下代码:

    1
    2
    3
    4
    5
    {
    "e4x": true,
    // 保存时自动格式化,看个人需要
    // "format_on_save": true,
    }

生活不止眼前的苟且,还有诗和远方的田野。

Using git-flow to automate your git branching workflow.

(原文)

After installing git-flow (brew install git-flow), you can start using git-flow in your repository by using it’s init command. You can use it in existing projects, but let’s start a new repository:

1
2
3
4
5
6
7
8
9
10
11
12
$ git flow init
Initialized empty Git repository in ~/project/.git/
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master]
Branch name for "next release" development: [develop]

How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []

Feature branches

1. git flow feature start authentication
2. git flow feature finish authentication

Versioned releases

1. git flow release start 0.1.0
2. git flow release finish 0.1.0

Hotfixing production code

1. git flow hotfix start assets
2. git flow hotfix finish assets

set git

1
2
3
4
5
6
7
8
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.st status
# 很好看地显示git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen (%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
# 设置用户信息