Sublime正则替换修改Hosts文件为MikroTik配置

Standard

感谢老D博客整理更新这些科学上网Hosts

我需把它们配到MikroTik路由器上时格式要改一下
说真的,每次用正则都要查一下才行,这东西真难记

MikroTik:
[admin@MikroTik] ip dns static> add address=10.0.0.1 name=www.example.com

Sublime:
Find What: (\d+.\d+.\d+.\d+)\s+([A-Za-z0-9-]+.[A-Za-z0-9-]+)
Replace With: add address=$1 name=$2

精确调整Sublime的布局

Standard

按ctrl+` 键入window.get_layout()回车查看当前layout,然后结合下面的图一看你就会明白了。

self.window.set_layout({
            "cols": [0.0, 0.5, 1.0],
            "rows": [0.0, 0.25, 0.75, 1.0],
            "cells": [[0, 0, 1, 2], [1, 0, 2, 1], [0, 2, 1, 3], [1, 1, 2, 3]]
            })
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
             0.0                             0.5                           1.0
              +------------------------------->;+---------------------------->
 
             0,0                            1,0                             2,0
      0.0+    +-------------------------------+-----------------------------+
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         v    |                              1,1                           2,1
     0.25+    |                               +-----------------------------+
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |  0,2                              1,2                            |
         v    +-------------------------------+                             |
     0.75+    |                               |                             |
         |    |                               |                             |
         |    |                               |                             |
         |   0,3                             1,3                           2,3
      1.0v    +-------------------------------+-----------------------------+

Xdebug.sublime-settings

{
    "ide_key": "sublime.xdebug",
    "max_children": 32,
    "max_depth": 5,
     "debug_layout" : {
        "cols": [0.0, 0.8, 1.0],
        "rows": [0.0, 0.6, 1.0],
        "cells": [[0, 0, 1, 2], [1, 0, 2, 1], [1, 1, 2, 2]]
    },
}

Sublime常用

Standard

常用插件:
BracketHighlighter
CodeIntel
ConverToUTF8
DocBlockr
Emmet
SideBarEnhancements

Preferences.sublime-settings:

{
	"auto_complete_delay": 300,
	"default_encoding": "UTF-8",
	"default_line_ending": "unix",
	"font-size": 12,
	"font_face": "microsoft yahei",
	"highlight_line": true,
	"draw_minimap_border": true,
	"always_show_minimap_viewport": true,
	"ignored_packages":
	[
		"Vintage"
	],
	"line_padding_bottom": 1,
	"line_padding_top": 1,
	"show_encoding": true,
	"tab_size": 4,
	"translate_tabs_to_spaces": true,
	"update_check": false,
	"word_wrap": false
}