mac 开发环境
Youga mac开发软件vs code
# 系统基础软件
# 浏览器
google chrome
# vpn
clashX
# 开发软件
# xcode (app store)
# git
# nodejs
sudo npm install -g n
n (version) 选择node版本
n latest (最新版本)
sudo npm install -g cnpm yarn
# iTerm2
profile.json
{
"Ansi 3 Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0,
"Red Component" : 0.73333334922790527
},
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 1,
"Red Component" : 0.3333333432674408
},
"Normal Font" : "Monaco 12",
"Custom Directory" : "No",
"Bold Color" : {
"Green Component" : 1,
"Blue Component" : 1,
"Red Component" : 1
},
"Right Option Key Sends" : 0,
"Ansi 6 Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0
},
"Rows" : 25,
"Default Bookmark" : "No",
"Non-ASCII Anti Aliased" : true,
"Use Bright Bold" : true,
"Ansi 10 Color" : {
"Green Component" : 1,
"Blue Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408
},
"Ambiguous Double Width" : false,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Ansi 15 Color" : {
"Green Component" : 1,
"Blue Component" : 1,
"Red Component" : 1
},
"Foreground Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527
},
"Working Directory" : "\/Users\/youga",
"Blinking Cursor" : false,
"Disable Window Resizing" : true,
"Sync Title" : false,
"Prompt Before Closing 2" : false,
"BM Growl" : true,
"Command" : "",
"Description" : "Default",
"Mouse Reporting" : true,
"Screen" : -1,
"Selection Color" : {
"Green Component" : 0.8353000283241272,
"Blue Component" : 1,
"Red Component" : 0.70980000495910645
},
"Columns" : 80,
"Idle Code" : 0,
"Ansi 13 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 1,
"Red Component" : 1
},
"Custom Command" : "No",
"ASCII Anti Aliased" : true,
"Non Ascii Font" : "Monaco 12",
"Vertical Spacing" : 1,
"Use Bold Font" : true,
"Option Key Sends" : 0,
"Selected Text Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0
},
"Background Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0
},
"Character Encoding" : 4,
"Ansi 11 Color" : {
"Green Component" : 1,
"Blue Component" : 0.3333333432674408,
"Red Component" : 1
},
"Use Italic Font" : true,
"Unlimited Scrollback" : false,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[1;6A"
},
"0x37-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0x32-0x40000" : {
"Action" : 11,
"Text" : "0x00"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[17;2~"
},
"0xf70c-0x20000" : {
"Action" : 10,
"Text" : "[20;2~"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[1;2H"
},
"0xf72b-0x40000" : {
"Action" : 10,
"Text" : "[1;5F"
},
"0xf705-0x20000" : {
"Action" : 10,
"Text" : "[1;2Q"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[1;6C"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[1;2A"
},
"0xf701-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x42"
},
"0x38-0x40000" : {
"Action" : 11,
"Text" : "0x7f"
},
"0x33-0x40000" : {
"Action" : 11,
"Text" : "0x1b"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[1;2C"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[1;5B"
},
"0xf70d-0x20000" : {
"Action" : 10,
"Text" : "[21;2~"
},
"0xf702-0x260000" : {
"Action" : 10,
"Text" : "[1;6D"
},
"0xf729-0x40000" : {
"Action" : 10,
"Text" : "[1;5H"
},
"0xf706-0x20000" : {
"Action" : 10,
"Text" : "[1;2R"
},
"0x34-0x40000" : {
"Action" : 11,
"Text" : "0x1c"
},
"0xf700-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x41"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf70e-0x20000" : {
"Action" : 10,
"Text" : "[23;2~"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[1;2D"
},
"0xf703-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x43"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[1;5A"
},
"0xf707-0x20000" : {
"Action" : 10,
"Text" : "[1;2S"
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[18;2~"
},
"0x35-0x40000" : {
"Action" : 11,
"Text" : "0x1d"
},
"0xf70f-0x20000" : {
"Action" : 10,
"Text" : "[24;2~"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[1;5C"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[1;6B"
},
"0xf702-0x280000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[1;2F"
},
"0x36-0x40000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[15;2~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[1;2B"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[19;2~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[1;5D"
},
"0xf704-0x20000" : {
"Action" : 10,
"Text" : "[1;2P"
}
},
"Window Type" : 0,
"Background Image Location" : "",
"Blur" : false,
"Scrollback Lines" : 1000,
"Send Code When Idle" : false,
"Close Sessions On End" : true,
"Terminal Type" : "xterm-256color",
"Visual Bell" : true,
"Flashing Bell" : false,
"Silence Bell" : false,
"Ansi 14 Color" : {
"Green Component" : 1,
"Blue Component" : 1,
"Red Component" : 0.3333333432674408
},
"Name" : "Default",
"Cursor Text Color" : {
"Green Component" : 1,
"Blue Component" : 1,
"Red Component" : 1
},
"Shortcut" : "",
"Cursor Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527
},
"Ansi 0 Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0
},
"Ansi 1 Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0.73333334922790527
},
"Horizontal Spacing" : 1,
"Transparency" : 0,
"Ansi 4 Color" : {
"Green Component" : 0,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0
},
"Ansi 5 Color" : {
"Green Component" : 0,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527
},
"Use Non-ASCII Font" : false,
"Ansi 7 Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527
},
"Ansi 8 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408
},
"Ansi 9 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 0.3333333432674408,
"Red Component" : 1
},
"Guid" : "B1C16E3E-27BA-4028-9650-9FCAB637E156",
"Ansi 2 Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0,
"Red Component" : 0
}
}
keyMap
{"Key Mappings":{"0x9-0x40000":{"Action":32,"Text":""},"0xf72b-0x100000":{"Action":4,"Text":""},"0xf702-0x320000":{"Action":33,"Text":""},"0xf703-0x300000":{"Text":"","Action":19},"0xf701-0x300000":{"Text":"","Action":21},"0xf72d-0x100000":{"Action":8,"Text":""},"0x19-0x60000":{"Action":39,"Text":""},"0xf702-0x300000":{"Text":"","Action":18},"0xf703-0x320000":{"Action":34,"Text":""},"0xf700-0x300000":{"Text":"","Action":20},"0xf72c-0x100000":{"Action":9,"Text":""},"0xf729-0x100000":{"Action":5,"Text":""},"0xf72c-0x20000":{"Action":9,"Text":""},"0xf72d-0x20000":{"Action":8,"Text":""}},"Touch Bar Items":{}}
# VS Code
setting.json
{
"workbench.colorTheme": "Sublime MavensMate Monokai Dimmed", // 界面主题
"workbench.iconTheme": "vscode-icons-mac", // icon 主题
"workbench.editor.enablePreview": false, // 覆盖窗口
"search.followSymlinks": true, // 在搜索中跟踪符号链接
"editor.fontSize": 14, // 字体大小
"editor.tabSize": 2, // 换行间隔
"editor.insertSpaces": true, //tab用空格
"editor.detectIndentation": false, // 根据文件类型自动设置tabsize的选项
"editor.formatOnType": true,
"editor.formatOnSave": true, // 保存自动格式化
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"javascript.updateImportsOnFileMove.enabled": "never", // 文件移动自动更新import
"files.autoSave": "onFocusChange", // 自动保存动作
"files.eol": "\n",
"files.associations": {
"*.vue": "vue"
},
"eslint.options": {
"extensions": [".js", ".vue"]
},
// "eslint.format.enable": true,
// "eslint.alwaysShowStatus": true,
"prettier.printWidth": 100, // 超过最大值换行
"prettier.tabWidth": 2, // 缩进字节数
"prettier.useTabs": false, // 缩进不使用tab,使用空格
"prettier.semi": true, // 句尾添加分号
"prettier.singleQuote": true, // 使用单引号代替双引号
"prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
"prettier.arrowParens": "avoid", // (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
"prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
// "prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
// "prettier.endOfLine": "lf", // 结尾是 \n \r \n\r auto
"prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
// "prettier.eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
"prettier.jsxSingleQuote": true, // 在jsx中使用单引号代替双引号
// "prettier.parser": "babylon", // 格式化的解析器,默认是babylon
"prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
"prettier.trailingComma": "es5",
"security.workspace.trust.untrustedFiles": "open",
"stylelint.validate": ["vue", "css", "html", "less", "scss"],
"[vue]": {
"files.insertFinalNewline": true, // 结尾换行
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"files.insertFinalNewline": true,
"editor.defaultFormatter": "esbenp.prettier-vscode" // 结尾换行
// "editor.defaultFormatter": "esbenp.prettier-vscode" // 格式化选项
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
// "prettier.singleQuote": false
},
"editor.bracketPairColorization.enabled": true,
"git.mergeEditor": false,
"liveServer.settings.donotShowInfoMsg": true,
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
keyMap
// 将键绑定放在此文件中以覆盖默认值auto[]
[
{
"key": "cmd+y",
"command": "-editor.action.previewDeclaration",
"when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor"
},
{
"key": "cmd+y",
"command": "editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+backspace",
"command": "-editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+cmd+l",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+f",
"command": "-editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+alt+cmd+p",
"command": "editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
},
{
"key": "cmd+p",
"command": "-editor.action.triggerParameterHints",
"when": "editorHasSignatureHelpProvider && editorTextFocus"
},
{
"key": "cmd+j",
"command": "editor.action.joinLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+j",
"command": "-editor.action.joinLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "cmd+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "cmd+d",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
}
]