工作工具设置备份

VSCode

属性设置

{
    "sublimeTextKeymap.promptV3Features": true,
    "editor.snippetSuggestions": "top",
    "go.lintTool": "gometalinter",
    "gitlens.advanced.messages": {
        "suppressCommitHasNoPreviousCommitWarning": false,
        "suppressCommitNotFoundWarning": false,
        "suppressFileNotUnderSourceControlWarning": false,
        "suppressGitVersionWarning": false,
        "suppressLineUncommittedWarning": false,
        "suppressNoRepositoryWarning": false,
        "suppressUpdateNotice": false,
        "suppressWelcomeNotice": true
    },
    "window.zoomLevel": -1,
    "go.gotoSymbol.includeImports": true,
    "go.lintOnSave": "file",
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "go.lintFlags": [
        "-min_confidence=.8"
    ],
    "editor.minimap.enabled": false,
    "workbench.startupEditor": "newUntitledFile",
    "editor.multiCursorModifier": "alt",
    "search.useIgnoreFiles": false,
    "gitlens.remotes": [],
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "scm.diffDecorations": "gutter",
    "gitlens.advanced.repositorySearchDepth": 3,
    "gitlens.advanced.similarityThreshold": 1,
    "[html]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "files.associations": {
        "*.proto": "proto3"
    },
    "go.formatTool": "goimports",
    "go.useLanguageServer": true,
    "go.useGoProxyToCheckForToolUpdates": false,
    "gulp.autoDetect": "on",
    "window.menuBarVisibility": "toggle",
    "workbench.activityBar.visible": true
}

快捷键设置

// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": "ctrl+t",
        "command": "-workbench.action.showAllSymbols"
    },
    {
        "key": "ctrl+t",
        "command": "editor.action.transpose"
    },
    {
        "key": "alt+p",
        "command": "workbench.action.openWorkspace"
    },
    {
        "key": "alt+f5",
        "command": "-workbench.action.editor.nextChange",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+j",
        "command": "workbench.action.editor.previousChange",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+f5",
        "command": "-workbench.action.editor.previousChange",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+k ctrl+m",
        "command": "workbench.action.toggleMultiCursorModifier"
    },
    {
        "key": "ctrl+j",
        "command": "-editor.action.joinLines",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+j",
        "command": "-workbench.action.togglePanel"
    }
]

GOLand

此备份是基于 Visual Studio keymap 设置出来的自定义的快捷键。(2020年5月23日)

整合了自己常用的一些快捷命令,包含一些 sublime 的。

其中 ctrl t 来源于 sublime text 的 transpose 命令。这里是用 Macro 的方式定义出来的。


  
  
  
    
  
  
  
  
  
  
  
    
  
  
  
  
  
  
  
  
  
  
  
  
  
    
  
  
  
  
  
    
  
  
    
  
  
    
  
  
    
  
  
  
  
  
  
    
  
  
    
  
  
  
  
    
  
  
    
  
  
    
  
  
    
  
  
  
  
  
    
  
  
  
  
    
  
  
    
  
  
    
  
  
    
  
  
  
  
  
  
  
  
    
  
  
  
  
    
  
  
    
  
  
  
    
  
  
  
    
  
  
  
    
  
  
    
  
  
  
  
  

Git

[alias]
        l = log
        c = checkout
        b = branch
        s = status
        d = diff
        g = log --graph --all
[core]
        pager = less 
        pager = less -x --mouse
[pager]
        branch = false
[diff]
        tool = vimdiff

如果想让 diff/log/branch 命令界面成全视窗阅读时,设置下环境变量: export LESS=-r(设置在 .bashrc 中)。

说明,pager 是用在显示 diff、log、branch 时设置是否分页显示。
默认用 less 工具,支持分页,但默认需要用 Enter 和 上下键 来实现滚动,而不支持鼠标滑轮滚动。
设置 pager = less -c --mouse 后可实现鼠标滑轮滚动,但又不支持鼠标选中文本了。
设置环境变量 export LESS=-r 后不需要设置 less 其他参数就既可以实现鼠标滚动,又可以鼠标选中文本了。
-c 实现先清屏再输出,--mouse 实现鼠标操作,-r 输出 raw 控制字符。

设置 git diff 显示代码中的中文字符:

 git config --global core.quotepath false          # 显示 status 编码
 git config --global gui.encoding utf-8            # 图形界面编码
 git config --global i18n.commit.encoding utf-8    # 提交信息编码
 git config --global i18n.logoutputencoding utf-8  # 输出 log 编码
 export LESSCHARSET=utf-8

GitHub 的访问

  • 参考 using-ssh-over-the-https-port

WindowPowerShell

自定义命令或命令别名(alias)

# ~\Documents\WindowsPowerShell> vim .\profile.ps1                                                                                                                                                                                                                               
Import-Module 'D:\Program Files\posh-git\src\posh-git.psd1'

function cdHome {cd $HOME}
function cdShell {cd C:\Users\{xxxx}\Documents\WindowsPowerShell}
function catWithCn($a) {get-content -encoding utf8 $a} # cat 支持中文

$env:LESS="-r"

Set-Alias -Name home -Value cdHome
Set-Alias -Name shell -Value cdShell
Set-Alias -Name l -Value ls
Set-Alias -Name catt -Value catWithCn # 中文输出文件内容

vim 不支持中文问题

# C:\Users\{xxxxxxxxxx}> vim .\.vimrc
set termencoding=utf-8
set encoding=utf8
set fileencodings=utf8,ucs-bom,gbk,cp936,gb2312,gb18030

你可能感兴趣的:(工作工具设置备份)