zjlsp
12/21/2017 - 11:40 AM

automatic update by http://atom.io/packages/sync-settings

/*
 * Your Stylesheet
 *
 * This stylesheet is loaded when Atom starts up and is reloaded automatically
 * when it is changed and saved.
 *
 * Add your own CSS or Less to fully customize Atom.
 * If you are unfamiliar with Less, you can read more about it here:
 * http://lesscss.org
 */


/*
 * Examples
 * (To see them, uncomment and save)
 */

// style the background color of the tree view
.tree-view {
  // background-color: whitesmoke;
}

// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
  // color: white;
  // background-color: hsl(180, 24%, 12%);
}

// style UI elements inside atom-text-editor
atom-text-editor .cursor {
  // border-color: red;
}
# =========================================================================
# php文件的代码段
# ========================================================================
".php":

    # header 头部设置的几个代码块
    "header(UTF8) 字符设置":
        prefix: "header_uft8"
        body: "header('Content-type:text/${1:html};charset=${2:utf-8}');$3"

    "header(image) 输出图片":
        prefix: "header_image"
        body: "header('Content-type:image/${1:jpeg}');$2"

    "header(MVC) MVC通用header设置":
        prefix: "header_mvc"
        body: '''
                /*
                 * 强制使用UTF-8编码
                 */
                header("Content-type: text/html; charset=utf-8");
                header("Cache-control: no-cache,no-store,must-revalidate");
                header("Pramga: no-cache");
                header("Expires: -1");
              '''

    "header(filename) 文件下载":
        prefix: "header_file"
        body: '''
                #表示服务器告诉浏览器接下来返回给你的内容是流媒体文件格式的数据
                header("Content-type:application/octet-stream");
                #表示服务器告诉浏览器接下来返回的内容你应该当成附件(文件)的形式来对待,新名字以filename规定的名字来命名
                header("Content-disposition:attachment;filename=${1:$newFileName}");
                #将文件的内容输出给浏览器
                echo file_get_contents(${2:$wholeFileName});$3
              '''

    "header(ajax) ajax跨域解决":
        prefix: "header_ajax"
        body: "header('Access-Control-Allow-Origin:*');$1"

    "mysql 数据库连接":
        prefix: "mysql"
        body: '''
                # 连接数据库
                $${1:conn} = mysql_connect('${2:127.0.0.1}:${3:3306}','${4:root}','${5:123456}',MYSQL_CLIENT_COMPRESS);
                # 设置字符集编码
                mysql_set_charset('${6:utf8}',$${1:conn});
                # 选择数据库
                mysql_select_db('${7:test}',$${1:conn});$8
              '''

    "curl 基础核心方法":
        prefix: "curl-json"
        body: '''
                public function CurlPostJson($url,$data){
            		//第1步:初始化虚拟浏览器
            	    $ch = curl_init();
            	    //第2步:设置浏览器
            	    curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);//启用安全上传模式
            	    curl_setopt($ch,CURLOPT_URL,$url);
            	    curl_setopt( $ch,CURLOPT_RETURNTRANSFER,true );//以text/plain文本流返回
            	    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);//没有ssl认证服务器
            	    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);//告诉api地址不要去找ssl证书
            		//post方式curl在php5.6以后会抛出温馨提示,所以我们要@屏蔽温馨提示,否则会影响返回结构
            		@curl_setopt($ch, CURLOPT_POST, true); //设置请求方式为post
            		$data = json_encode($data);
            		$length = strlen($data);
            		@curl_setopt($ch,CURLOPT_POSTFIELDS,$data);//设置数据包
            		curl_setopt($ch,CURLOPT_HTTPHEADER,array(
                        "Content-type:application/json",
                        "Content-length:".$length
            		));
            		$result = curl_exec( $ch );
            	    curl_close($ch);
            	    return $result;
            	}
        '''

# =========================================================================
# php文件的代码段【Redis代码段】
# ========================================================================
    "redis ":
        prefix: "redis"
        body: '''
                $redis = new Redis();
                $redis -> connect('localhost',6379);
                $redis -> auth('${1:password}');$2
              '''

    "redis string设置":
        prefix: "redis-set"
        body: "$redis -> set('${1:key}','${2:value}');$3"

    "redis string获取":
        prefix: "redis-get"
        body: "$redis -> get('${1:key}');$2"

    "redis hmset哈希设置":
        prefix: "redis-hmset"
        body: '''
            $redis -> hmset("${1:哈希表名}",[
                "${2:字段名}" => '${3:$value}',
            ]);$3
        '''

    "redis hgetall哈希表获取":
        prefix: "redis-hgetall"
        body: "$redis -> hgetall('${1:哈希表名}');$2"

    "redis hset哈希表设置":
        prefix: "redis-hset"
        body: "$redis -> hset('${1:哈希表名}','${2:字段名}','${3:$value}');"

    "redis zadd有序集合":
        prefix: "redis-zadd"
        body: "$redis -> zadd('${1:集合名}','${2:序号}','${3:$value}');$4"

    "redis zrange集合升序":
        prefix: "redis-zrange"
        body: "$redis -> zrange('${1:集合名}',0,-1);"

    "redis zrevrange集合降序":
        prefix: "redis-zrevrange"
        body: "$redis -> zrevrange('${1:集合名}',0,-1);"

    "redis rpush队列入队":
        prefix: "redis-rpush"
        body: "$redis -> rpush('${1:队列名}',${3:$value} );"

    "redis lpop队列出队":
        prefix: "redis-lpop"
        body: "$redis -> lpop('${1:队列名}');"




# ========================================================================
# php文件的代码段【thinkphp代码段】
# ========================================================================


    "tp3 创建模型":
        prefix: "tpm3"
        body: '''
                    namespace ${1:Admin}\\\\Model;
                    class ${2:Name}Model extends \\\\Think\\\\Model
                    {
                        # thinkPHP自动验证
                        protected $_validate = array(
                            // array(验证字段,验证规则,错误提示,[验证条件,附加规则,验证时间])
                            // 验证规则:require 字段必须、email 邮箱、url URL地址、currency 货币、number 数字
                            // 验证条件:0 存在字段就验证(默认)  1 必须验证   2 值不为空的时候验证
                            // 附加规则:regex 正则验证  callback 方法验证  unique 验证是否唯一  ……
                            // 验证时间:1 添加数据时候验证  2 编辑数据时候验证  3 全部情况下验证
                            ${3:array('cat_name','require','分类名称不能为空',0,'regex',3),
                            array('cat_name','','分类重名,修改后重试',0,'unique',3),
                            array('cat_name','is_password','密码验证不通过',0,'callback',3)}
                        );

                        # 前钩子
                        protected function _before_insert(&$data,$options){
                            return true;
                        }
                        # 后钩子
                        protected function _after_find(&$result, $options){
                            return true;
                        }$7
                    }
              '''

    "tp3 输出验证码":
        prefix: "tpverify"
        body: '''
                  // 定义验证码配置
                  $config = array(
                      'fontSize' => 13,           // 验证码字体大小(px)
                      'useCurve' => false,        // 是否设置混淆曲线
                      'useNoise' => false,        // 是否添加背景混淆
                      'imageW'   => 0,            // 验证码图片宽度
                      'imageH'   => 0,            // 验证码图片高度
                      'length'   => 4,            // 验证码长度
                  );
                  // 实例化验证码类
                  $Verify = new \\\\Think\\\\Verify($config);
                  // 输出验证码
                  $Verify->entry();
              '''
    "tp3 创建控制器":
        prefix: "tpc3"
        body: '''
            namespace ${1:Admin}\\\\Controller;
            class ${2:Index}Controller extends ${3:Think\\\\Controller} {

                /**
                 * 构造函数
                 */
                public function __construct()
            	{
            		parent::control();
            	}

                public function index(){
                    ${4:$this->show('列表展示方法');}
                }$5

            }
        '''
    "控制器添加修改方法":
        prefix: "tpadd3"
        body: '''
            public function ${1:add}(){
                $${2:AdminLogin}model = D('${2:AdminLogin}');
                if (IS_POST) {
                    if (!$data = $${2:AdminLogin}model->create(I('post.'),1)) {
                        $this->error($${2:AdminLogin}model->getError());
                    }
                    if ($${2:AdminLogin}model->${3:add}($data)) {
                        $this->success('数据添加成功',U('${4:index}')); exit;
                    }else{
                        $this->error('数据添加失败');
                    }
                }
                $this->display();
            }$5
        '''

    "控制器删除方法":
        prefix: "tpdel3"
        body: '''
            public function ${1:del}(){
                $${2:Project}Model = D('${2:Project}');
                if( $${2:Project}Model->where(I('get.'))->delete()){
                    $this->success('数据删除成功', U('index'));
                }else{
                    $this->error('数据删除失败');
                }
            }$3
        '''



# =========================================================================
# js文件的代码段
# ========================================================================
".source.js":
    "ajax基础方法":
        prefix: "ajax"
        body: '''
                // 实例化ajax对象
                var xmlhttp;
                try {
                    ${1:xmlhttp} = new XMLHttpRequest();
                } catch (e) {
                    ${1:xmlhttp} = new ActiveXObject('Microsoft.XMLHTTP');
                }
                // 开启监听
                ${1:xmlhttp}.onreadystatechange = function() {
                    if (this.readyState == 4 && this.status == 200) {
                        // 打印响应结果 this.responseText
                        ${6:console.log(this.responseText);}
                        // console.log(JSON.parse(this.responseText));
                        // console.log(this.responseXML);
                    }
                };
                // 建立http请求(请求方式,请求连接,是否异步请求)
                ${1:xmlhttp}.open(${2:'post'},${3:url},${4:true});
                // post请求必须 get请求可以去掉
                ${1:xmlhttp}.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                // 开启ajax请求 post请求数据例子:age=18&email=admin@qq.com
                ${1:xmlhttp}.send(${5:'post请求的数据'});$7
              '''
    "ajax 状态值":
        prefix: "readystate"
        body: "readyState"
    "IE678实例化ajax":
        prefix: "ActiveXObject"
        body: "var ${1:xmlhttp} = new ActiveXObject('Microsoft.XMLHTTP');$2"
    "主流浏览器实例化ajax":
        prefix: "XMLHttpRequest"
        body: "var ${1:xmlhttp} = new XMLHttpRequest();$2"
{
	"activate-power-mode": {
		"comboMode": {
			"exclamationEvery": 1
		},
		"particles": {
			"totalCount": {
				"max": 20
			}
		},
		"plugins": {
			"playAudio": true,
			"screenShake": true
		}
	},
	"aligner": {},
	"all-times-you-know": {
		"sort": "date-posted-asc"
	},
	"api-docs": {
		"jquery": true,
		"php": true
	},
	"atom-beautify": {
		"general": {
			"_analyticsUserId": "e81a7dad-b637-4de4-9922-8e7ac8cf2e96"
		},
		"php": {
			"cs_fixer_path": "C:/Users/admin/.atom/packages/php-cs-fixer/php-cs-fixer.phar",
			"fixers": "short_tag,parenthesis,php_closing_tag,function_call_space,function_declaration",
			"level": "psr2"
		},
		"vue": {
			"beautify_on_save": true
		}
	},
	"atom-package-deps": {
		"ignored": []
	},
	"autocomplete-paths": {
		"enableHtmlSupport": true,
		"ignoreBuiltinScopes": true,
		"ignoreSubmodules": true,
		"ignoredPatterns": [
			"php"
		]
	},
	"color-picker": {
		"abbreviateValues": true,
		"automaticReplace": true
	},
	"core": {
		"closeDeletedFileTabs": true,
		"disabledPackages": [
			"autocomplete-atom-api",
			"activate-power-mode"
		],
		"openEmptyEditorOnStart": false,
		"packagesWithKeymapsDisabled": [],
		"telemetryConsent": "limited"
	},
	"editor": {
		"confirmCheckoutHeadRevision": false,
		"fontSize": 16,
		"preferredLineLength": 100,
		"scrollPastEnd": true,
		"showIndentGuide": true,
		"softWrap": true,
		"softWrapAtPreferredLineLength": true,
		"tabLength": 4
	},
	"exception-reporting": {
		"userId": "9ffec798-3dd5-4469-82a4-650595f9f3b9"
	},
	"file-header": {
		"autoAddingHeaderOnSaving": false,
		"dateTimeFormat": "YYYY-MM-DD HH:mm:ss",
		"enableFilename": true,
		"numOfEmptyLinesAfterNewHeader": 1,
		"realname": "Shengpeng Li"
	},
	"flickr-background": {},
	"ftp-remote-edit": {
		"config": "abf517b4f460679d65de80b5c1ee67d38e512c983254f36a27267b4294ed0d8b44500014290c41be4ca2ac035bf30ea89a5ef6d4b382a1f2949bec08e518eefa562f9cd8876c20894c4771f9d1467a6527c76c708bfb35647e6ad909c8faa730155b4475b109f7b6eeca600739172d7393887242b01029b83994024d72d3fbc868424dd101a03676ed",
		"password": "c1bc06eea03b"
	},
	"git-plus": {
		"general": {}
	},
	"global-background": {
		"imageSource": {
			"custom": {
				"paths": {},
				"urls": {}
			}
		}
	},
	"linter": {},
	"linter-eslint": {
		"fixOnSave": true,
		"lintHtmlFiles": true
	},
	"linter-jshint": {},
	"linter-php": {
		"ignorePhpIni": true
	},
	"linter-ui-default": {
		"panelHeight": 69
	},
	"markdown-preview-plus-opener": {},
	"minimap": {},
	"php-cs-fixer": {
		"executeOnSave": true,
		"showInfoNotifications": true
	},
	"php-debug": {
		"currentPanelHeight": "232px",
		"currentPanelMode": "side"
	},
	"php-integrator-symbol-viewer": {
		"defaultShowInherited": true,
		"panelSide": "left"
	},
	"php-refactoring": {
		"executablePath": "C:/Users/admin/.atom/packages/php-refactoring/refactor.phar"
	},
	"php-server": {},
	"pigments": {
		"filetypesForColorWords": [
			"css",
			"less",
			"styl",
			"stylus",
			"sass",
			"scss",
			"php"
		]
	},
	"random-tips": {
		"displayOnLeft": true
	},
	"remote-ftp": {
		"statusbar": {
			"enable": true
		}
	},
	"snippet-injector": {
		"atomSync": true
	},
	"snippet-manager": {
		"json": true,
		"root": "C:/Users/admin/.atom/snippet"
	},
	"structure-view": {},
	"sync-settings": {
		"removeObsoletePackages": true
	},
	"tasks": {
		"addTimestampOnConvertToTask": true,
		"useTouchbar": true
	},
	"tool-bar": {
		"iconSize": "16px",
		"position": "Left"
	},
	"tree-view": {},
	"welcome": {
		"showOnStartup": false
	}
}
[
	{
		"name": "about",
		"version": "1.8.0"
	},
	{
		"name": "activate-power-mode",
		"version": "2.7.0"
	},
	{
		"name": "aligner",
		"version": "1.2.4"
	},
	{
		"name": "aligner-javascript",
		"version": "1.3.0"
	},
	{
		"name": "aligner-php",
		"version": "1.2.0"
	},
	{
		"name": "archive-view",
		"version": "0.64.2"
	},
	{
		"name": "atom-autocomplete-php",
		"version": "0.25.6"
	},
	{
		"name": "atom-beautify",
		"version": "0.32.2"
	},
	{
		"name": "atom-dark-syntax",
		"version": "0.29.0",
		"theme": "syntax"
	},
	{
		"name": "atom-dark-ui",
		"version": "0.53.1",
		"theme": "ui"
	},
	{
		"name": "atom-light-syntax",
		"version": "0.29.0",
		"theme": "syntax"
	},
	{
		"name": "atom-light-ui",
		"version": "0.46.1",
		"theme": "ui"
	},
	{
		"name": "atom-material-ui",
		"version": "2.1.3",
		"theme": "ui"
	},
	{
		"name": "atom-miku",
		"version": "2.2.5"
	},
	{
		"name": "autocomplete-atom-api",
		"version": "0.10.7"
	},
	{
		"name": "autocomplete-css",
		"version": "0.17.5"
	},
	{
		"name": "autocomplete-html",
		"version": "0.8.4"
	},
	{
		"name": "autocomplete-php",
		"version": "0.3.7"
	},
	{
		"name": "autocomplete-plus",
		"version": "2.40.2"
	},
	{
		"name": "autocomplete-snippets",
		"version": "1.12.0"
	},
	{
		"name": "autoflow",
		"version": "0.29.3"
	},
	{
		"name": "autosave",
		"version": "0.24.6"
	},
	{
		"name": "background-tips",
		"version": "0.27.1"
	},
	{
		"name": "base16-tomorrow-dark-theme",
		"version": "1.5.0",
		"theme": "syntax"
	},
	{
		"name": "base16-tomorrow-light-theme",
		"version": "1.5.0",
		"theme": "syntax"
	},
	{
		"name": "bookmarks",
		"version": "0.45.1"
	},
	{
		"name": "bracket-matcher",
		"version": "0.89.1"
	},
	{
		"name": "busy-signal",
		"version": "1.4.3"
	},
	{
		"name": "color-picker",
		"version": "2.2.5"
	},
	{
		"name": "command-palette",
		"version": "0.43.5"
	},
	{
		"name": "dalek",
		"version": "0.2.1"
	},
	{
		"name": "deprecation-cop",
		"version": "0.56.9"
	},
	{
		"name": "dev-live-reload",
		"version": "0.48.1"
	},
	{
		"name": "docblockr",
		"version": "0.13.7"
	},
	{
		"name": "emmet",
		"version": "2.4.3"
	},
	{
		"name": "encoding-selector",
		"version": "0.23.8"
	},
	{
		"name": "exception-reporting",
		"version": "0.43.1"
	},
	{
		"name": "file-header",
		"version": "1.13.9"
	},
	{
		"name": "file-icons",
		"version": "2.1.17"
	},
	{
		"name": "find-and-replace",
		"version": "0.215.5"
	},
	{
		"name": "fuzzy-finder",
		"version": "1.7.5"
	},
	{
		"name": "git-diff",
		"version": "1.3.9"
	},
	{
		"name": "github",
		"version": "0.10.3"
	},
	{
		"name": "go-to-line",
		"version": "0.33.0"
	},
	{
		"name": "goto-definition",
		"version": "1.3.4"
	},
	{
		"name": "grammar-selector",
		"version": "0.49.9"
	},
	{
		"name": "highlight-selected",
		"version": "0.13.1"
	},
	{
		"name": "image-view",
		"version": "0.62.4"
	},
	{
		"name": "incompatible-packages",
		"version": "0.27.3"
	},
	{
		"name": "intentions",
		"version": "1.1.5"
	},
	{
		"name": "javascript-snippets",
		"version": "1.2.1"
	},
	{
		"name": "json-level-color",
		"version": "0.1.4"
	},
	{
		"name": "keybinding-resolver",
		"version": "0.38.1"
	},
	{
		"name": "language-c",
		"version": "0.59.2"
	},
	{
		"name": "language-clojure",
		"version": "0.22.7"
	},
	{
		"name": "language-coffee-script",
		"version": "0.49.3"
	},
	{
		"name": "language-csharp",
		"version": "1.0.1"
	},
	{
		"name": "language-css",
		"version": "0.42.10"
	},
	{
		"name": "language-gfm",
		"version": "0.90.3"
	},
	{
		"name": "language-git",
		"version": "0.19.1"
	},
	{
		"name": "language-go",
		"version": "0.45.2"
	},
	{
		"name": "language-html",
		"version": "0.49.0"
	},
	{
		"name": "language-hyperlink",
		"version": "0.16.3"
	},
	{
		"name": "language-java",
		"version": "0.28.0"
	},
	{
		"name": "language-javascript",
		"version": "0.128.3"
	},
	{
		"name": "language-json",
		"version": "0.19.1"
	},
	{
		"name": "language-less",
		"version": "0.34.2"
	},
	{
		"name": "language-make",
		"version": "0.22.3"
	},
	{
		"name": "language-mustache",
		"version": "0.14.5"
	},
	{
		"name": "language-objective-c",
		"version": "0.15.1"
	},
	{
		"name": "language-perl",
		"version": "0.38.1"
	},
	{
		"name": "language-php",
		"version": "0.43.1"
	},
	{
		"name": "language-property-list",
		"version": "0.9.1"
	},
	{
		"name": "language-python",
		"version": "0.49.2"
	},
	{
		"name": "language-ruby",
		"version": "0.71.4"
	},
	{
		"name": "language-ruby-on-rails",
		"version": "0.25.3"
	},
	{
		"name": "language-sass",
		"version": "0.61.4"
	},
	{
		"name": "language-shellscript",
		"version": "0.26.1"
	},
	{
		"name": "language-source",
		"version": "0.9.0"
	},
	{
		"name": "language-sql",
		"version": "0.25.10"
	},
	{
		"name": "language-text",
		"version": "0.7.3"
	},
	{
		"name": "language-todo",
		"version": "0.29.4"
	},
	{
		"name": "language-toml",
		"version": "0.18.2"
	},
	{
		"name": "language-typescript",
		"version": "0.3.2"
	},
	{
		"name": "language-vue",
		"version": "0.23.1"
	},
	{
		"name": "language-xml",
		"version": "0.35.2"
	},
	{
		"name": "language-yaml",
		"version": "0.31.2"
	},
	{
		"name": "line-ending-selector",
		"version": "0.7.5"
	},
	{
		"name": "link",
		"version": "0.31.4"
	},
	{
		"name": "linter",
		"version": "2.2.0"
	},
	{
		"name": "linter-eslint",
		"version": "8.4.1"
	},
	{
		"name": "linter-php",
		"version": "1.5.1"
	},
	{
		"name": "linter-ui-default",
		"version": "1.7.1"
	},
	{
		"name": "local-history",
		"version": "4.3.1"
	},
	{
		"name": "markdown-preview",
		"version": "0.159.20"
	},
	{
		"name": "metrics",
		"version": "1.2.6"
	},
	{
		"name": "minimap",
		"version": "4.29.8"
	},
	{
		"name": "notifications",
		"version": "0.70.2"
	},
	{
		"name": "one-dark-syntax",
		"version": "1.8.2",
		"theme": "syntax"
	},
	{
		"name": "one-dark-ui",
		"version": "1.10.10",
		"theme": "ui"
	},
	{
		"name": "one-light-syntax",
		"version": "1.8.2",
		"theme": "syntax"
	},
	{
		"name": "one-light-ui",
		"version": "1.10.10",
		"theme": "ui"
	},
	{
		"name": "open-on-github",
		"version": "1.3.1"
	},
	{
		"name": "package-generator",
		"version": "1.3.0"
	},
	{
		"name": "php-cs-fixer",
		"version": "4.1.1"
	},
	{
		"name": "regex-railroad-diagram",
		"version": "0.19.4"
	},
	{
		"name": "remote-ftp",
		"version": "2.1.4"
	},
	{
		"name": "settings-view",
		"version": "0.254.1"
	},
	{
		"name": "simplified-chinese-menu",
		"version": "5.3.5"
	},
	{
		"name": "snippet-generator-plus",
		"version": "0.1.2"
	},
	{
		"name": "snippets",
		"version": "1.3.1"
	},
	{
		"name": "solarized-dark-syntax",
		"version": "1.1.4",
		"theme": "syntax"
	},
	{
		"name": "solarized-light-syntax",
		"version": "1.1.4",
		"theme": "syntax"
	},
	{
		"name": "spell-check",
		"version": "0.72.7"
	},
	{
		"name": "status-bar",
		"version": "1.8.15"
	},
	{
		"name": "styleguide",
		"version": "0.49.10"
	},
	{
		"name": "symbols-view",
		"version": "0.118.2"
	},
	{
		"name": "sync-settings",
		"version": "0.8.5"
	},
	{
		"name": "tabs",
		"version": "0.109.1"
	},
	{
		"name": "timecop",
		"version": "0.36.2"
	},
	{
		"name": "tree-view",
		"version": "0.221.3"
	},
	{
		"name": "update-package-dependencies",
		"version": "0.13.1"
	},
	{
		"name": "welcome",
		"version": "0.36.6"
	},
	{
		"name": "whitespace",
		"version": "0.37.5"
	},
	{
		"name": "wrap-guide",
		"version": "0.40.3"
	}
]
#
# @Author: 李圣鹏
# @Date:   2017-05-22 11:29:23
# @Email:  2597887094@qq.com
# @Filename: keymap.cson
# @Last modified by:   李圣鹏
# @Last modified time: 2018-02-24 17:18:06

# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
#
# 'atom-text-editor':
#   'enter': 'editor:newline'
#
# 'atom-workspace':
#   'ctrl-shift-p': 'core:move-up '
#   'ctrl-p': 'core:move-down'
#
# You can find more information about keymaps in these guides:
# * http://flight-manual.atom.io/using-atom/sections/basic-customization/#_customizing_keybindings
# * http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/
#
# If you're having trouble with your keybindings not working, try the
# Keybinding Resolver: `Cmd+.` on macOS and `Ctrl+.` on other platforms. See the
# Debugging Guide for more information:
# * http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-the-keybindings
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
#
'snippet-generator-plus':
  'ctrl-shift-t': 'snippet-generator-plus:generate'
'atom-text-editor[data-grammar~="html"]':
  'ctrl-shift-q': 'open-html-in-browser:open'
'.tree-view':
  'shift-o': 'open-html-in-browser:selected-entry'
'atom-text-editor':
  'ctrl-alt-b': 'atom-beautify:beautify-editor'
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
#   editor.onDidSave ->
#     console.log "Saved! #{editor.getPath()}"
atom.commands.dispatch(document.querySelector('atom-workspace'), 'snippet-manager:toggle')