IDE进阶配置

Vscode

setting.json

  1. node_modules 中展示文件范围配置
  2. Vim配置
  3. 主题颜色修改
{
  "emmet.syntaxProfiles": {
    "vue-html": "html",
    "vue": "html"
  },
  "terminal.integrated.fontSize": 15,
  "workbench.startupEditor": "newUntitledFile",
  "files.associations": {
    "*.tpl": "html",
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript",
    "*._less": "less"
  },
  "editor.tabSize": 2,
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  // "editor.fontFamily": "Jetbrains Mono",
  "editor.fontFamily": "Cascadia Code",
  "editor.fontLigatures": true,
  "sync.gist": "def69a4c83ad18b8eb0d2c41e3efe0a5",
  "todohighlight.isEnable": true,
  "breadcrumbs.enabled": true,
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "search.exclude": {
    "**/node_modules": false,
    "**/bower_components": true,
    "**/target": true,
    "**/logs": true
  },
  "files.exclude": {
    "**/.classpath": true,
    "**/.factorypath": true,
    "**/.project": true,
    "**/.settings": true,
    "**/node_modules/{[a-z]}*": true
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "prettier.arrowParens": "always",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "eslint.run": "onSave",
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "prettier.singleQuote": true,
  "workbench.iconTheme": "material-icon-theme",
  "editor.suggestSelection": "first",
  "workbench.colorCustomizations": {
    "[GitHub Plus]": {
      "editor.background": "#E3EDCD",
      "sideBar.background": "#E3EDCD",
      "terminal.background": "#E3EDCD",
      "editorSuggestWidget.selectedBackground": "#e5e7f3",
      "editorSuggestWidget.selectedForeground": "#333",
      // 最后两位是透明度 70%
      "editor.lineHighlightBackground": "#FFF2E280",
      "minimap.background": "#FAF9DE80",
      "editorSuggestWidget.focusHighlightForeground": "#f36422"
    }
  },
  "[less]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "redhat.telemetry.enabled": false,
  "js/ts.implicitProjectConfig.experimentalDecorators": true,
  "security.workspace.trust.untrustedFiles": "open",
  "terminal.integrated.tabs.location": "left",
  "editor.bracketPairColorization.enabled": true,
  "editor.suggest.preview": true,
  "javascript.inlayHints.enumMemberValues.enabled": true,
  "javascript.inlayHints.parameterNames.enabled": "literals",
  "typescript.inlayHints.enumMemberValues.enabled": true,
  "typescript.inlayHints.parameterNames.enabled": "literals",
  "diffEditor.ignoreTrimWhitespace": false,
  "terminal.integrated.gpuAcceleration": "off",
  "window.newWindowDimensions": "offset",
  "editor.inlineSuggest.enabled": true,
  "github.copilot.enable": {
    "*": false,
    "yaml": false,
    "plaintext": false,
    "markdown": false,
    "typescriptreact": false,
    "javascript": false
  },
  "editor.fontSize": 15,
  "workbench.list.automaticKeyboardNavigation": false,
  "vim.easymotion": true,
  "vim.sneak": false,
  "vim.smartRelativeLine": true,
  "vim.mouseSelectionGoesIntoVisualMode": false,
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.highlightedyank.enable": true,
  "vim.highlightedyank.duration": 300,
  "vim.insertModeKeyBindings": [
    {
      "before": ["j", "j"],
      "after": ["<Esc>"]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["<leader>", "d"],
      "after": ["d", "d"]
    },
    {
      "before": ["K"],
      "commands": ["lineBreakInsert"],
      "silent": true
    },
    {
      "before": ["<C-n>"],
      "commands": [":nohl"]
    },
    {
      "before": [":"],
      "commands": ["vim.showQuickpickCmdLine"]
    },
    {
      "before": ["g", "p"],
      "commands": ["git.pull"]
    },
    {
      "before": ["g", "s"],
      "commands": ["git.push"]
    },
    {
      "before": ["g", "m"],
      "commands": ["gitlens.gitCommands.merge"]
    },
    {
      "before": ["g", "r"],
      "commands": ["git.renameBranch"]
    },
    {
      "before": ["g", "v"],
      "commands": ["workbench.view.scm"]
    },
    {
      "before": ["/"],
      "commands": ["actions.find"]
    },
    {
      "before": ["<leader>", "/"],
      "commands": ["workbench.action.findInFiles"]
    },
    {
      "before": ["H"],
      "after": ["^"]
    },
    {
      "before": ["L"],
      "after": ["$"]
    },
    {
      "before": ["g", "["],
      "commands": ["editor.action.marker.prevInFiles"]
    },
    {
      "before": ["g", "]"],
      "commands": ["editor.action.marker.nextInFiles"]
    },
    {
      "before": ["j"],
      "after": ["g", "j"]
    },
    {
      "before": ["k"],
      "after": ["g", "k"]
    },
    {
      "before": ["<leader>", "p"],
      "after": ["\"", "0", "p"]
    }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-f>": false
  },
  "customWindowZoom.zoomLevelChangeValue": 0.7,
  "workbench.colorTheme": "Bearded Theme Coffee Reversed",
  "git.confirmSync": false
}

文件操作键盘快捷方式配置

// 将键绑定放在此文件中以覆盖默认值
[
  // --- 资源管理器中对文件或目录的操作
  // 新建文件
  {
    "key": "i",
    "command": "explorer.newFile",
    "when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
  },
  // 新建目录
  {
    "key": "o",
    "command": "explorer.newFolder",
    "when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
  },
  // 刷新资源管理器
  {
    "key": "r",
    "command": "workbench.files.action.refreshFilesExplorer",
    "when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
  },
  // 重命名文件或目录
  {
    "key": "a",
    "command": "renameFile",
    "when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
  },
  // 删除文件或目录
  {
    "key": "d",
    "command": "deleteFile",
    "when": " explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus "
  },
  // 剪切文件或目录
  {
    "key": "x",
    "command": "filesExplorer.cut",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
  },
  // 复制文件或目录
  {
    "key": "y",
    "command": "filesExplorer.copy",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
  },
  // 粘贴文件或目录
  {
    "key": "p",
    "command": "filesExplorer.paste",
    "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
  }
]

推荐插件

  1. Auto Close Tag
  2. Auto Import
  3. Auto Rename Tag
  4. Bearded Theme 推荐主题
  5. Better Comments
  6. Bookmarks
  7. Custom Window Zoom 自定义缩放
  8. Error Gutters
  9. ES7+ React/Redux/React-Native/JS snippets
  10. ESLint
  11. GitHub Copilot Github 智能代码提示
  12. GitHub Plus Theme 很喜欢的一块亮色主题
  13. gitignore
  14. GitLens — Git supercharged Git操作
  15. Git Graph History 一键查询历史记录
  16. HTML CSS Support
  17. ignore “g” it
  18. IntelliCode 代码智能提示
  19. javascript console utils 更便捷的添加日志打印
  20. Material Icon Theme
  21. npm Intellisense
  22. Path Intellisense
  23. Prettier - Code formatter
  24. Project Manager
  25. Search node_modules
  26. Settings Sync
  27. SVGR - SVG to React
  28. TODO Highlight
  29. Vim 非常好用的Vim插件
  30. Vue Language Features (Volar)
  31. XML
  32. Github Theme
  33. Andromeda theme
  34. Inline fold

Webstorm

.ideavimrc

"" Source your .vimrc
"source ~/.vimrc

"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5

" Do incremental searching.
inoremap jj <esc>
set incsearch
set hlsearch
set showmatch
set showmode
set relativenumber
" set keep-english-in-normal
" set keep-english-in-normal-and-restore-in-insert
set useSystemClipboard
set clipboard=unnamed

Plug 'easymotion/vim-easymotion'

" 空格space作为leader键
let mapleader=" "
set easymotion
set surround
set highlightedyank
set textobj-entire
set commentary
set argtextobj
map <Leader> <Plug>(easymotion-prefix)

" 映射idea常用快捷键
map H ^
map L $
map <C-n> :nohl<CR>

" 重命名:actionlist
nnoremap <Leader>rf :action RenameFile<CR>
nnoremap / :action Find<CR>
nnoremap <Leader>fc :action ReformatCode<CR><esc>
nnoremap <Leader>se :action SearchEverywhere<CR>
nnoremap <Leader>oi :action OptimizeImports<CR>
nnoremap <Leader>fp :action FindInPath<CR>
nnoremap <Leader>at Vy<CR>:action ActivateTerminalToolWindow<CR>
noremap <Leader>g, mm`m:action JumpToLastChange<CR>
noremap <Leader>g; mm`m:action JumpToNextChange<CR>
noremap <Leader>sw :action SurroundWith<CR>
noremap <Leader>sd :action SafeDelete<CR>
noremap <Leader>sof :action SelectInProjectView<CR>
" :actionlist 可以查看当前IDE所有可用的action

" 让ideavim支持将缓冲区内文本复制到系统缓冲区
vmap! <C-c> "+y

" Don't use Ex mode, use Q for formatting.
map Q gq


"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)

"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)

"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)


" Find more examples here: https://jb.gg/share-ideavimrc

更多配置见 链接

插件

  1. GitToolBox
  2. IdeaVim
  3. IdeaVim-EasyMotion
  4. IdeaVimExtension
  5. .ignore
  6. AceJump
  7. Atom Material Icons
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值