mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Merge branch 'master' of https://www.github.com/js0ny/dotfiles
This commit is contained in:
commit
f3dcda30a1
13 changed files with 1041 additions and 540 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -42,3 +42,5 @@ tools/nushell/
|
||||||
.venv/
|
.venv/
|
||||||
|
|
||||||
platforms/win/komorebi/applications.json
|
platforms/win/komorebi/applications.json
|
||||||
|
|
||||||
|
gitconfig
|
||||||
|
|
|
||||||
14
.vscode/extensions.json
vendored
Normal file
14
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"xadillax.viml",
|
||||||
|
"mark-wiemer.vscode-autohotkey-plus-plus",
|
||||||
|
"edwinkofler.vscode-assorted-languages",
|
||||||
|
"tamasfe.even-better-toml",
|
||||||
|
"kdl-org.kdl",
|
||||||
|
"sumneko.lua",
|
||||||
|
"ms-vscode.powershell",
|
||||||
|
"thenuprojectcontributors.vscode-nushell-lang",
|
||||||
|
"redhat.vscode-yaml",
|
||||||
|
"redhat.vscode-xml"
|
||||||
|
]
|
||||||
|
}
|
||||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -11,6 +11,7 @@
|
||||||
"pip.conf": "python-misc",
|
"pip.conf": "python-misc",
|
||||||
"*.kdl": "json",
|
"*.kdl": "json",
|
||||||
"gitconfig": "git",
|
"gitconfig": "git",
|
||||||
|
"gitconfig.example": "git",
|
||||||
"nvim/init.lua": "vim",
|
"nvim/init.lua": "vim",
|
||||||
"markdownlint.json": "markdownlint",
|
"markdownlint.json": "markdownlint",
|
||||||
"wslconfig": "settings",
|
"wslconfig": "settings",
|
||||||
|
|
@ -27,5 +28,6 @@
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"ideavimrc": "Vimscript",
|
"ideavimrc": "Vimscript",
|
||||||
".wslconfig": "properties",
|
".wslconfig": "properties",
|
||||||
|
"WindowsTerminal.json": "jsonc",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -2,30 +2,30 @@
|
||||||
# Date: 2024-12-01
|
# Date: 2024-12-01
|
||||||
# Author: js0ny
|
# Author: js0ny
|
||||||
# Set symlinks for dotfiles on Windows
|
# Set symlinks for dotfiles on Windows
|
||||||
# 在 Windows 上设置 dotfiles 的符号链接
|
# 在 Windows 上设置 配置文件的符号链接
|
||||||
|
|
||||||
$DOTFILES = Join-Path $env:UserProfile ".dotfiles"
|
$DOTFILES = Join-Path $Env:UserProfile ".dotfiles"
|
||||||
$BASE_COMMON = Join-Path $DOTFILES "common"
|
$BASE_COMMON = Join-Path $DOTFILES "common"
|
||||||
$BASE_TOOLS = Join-Path $DOTFILES "tools"
|
$BASE_TOOLS = Join-Path $DOTFILES "tools"
|
||||||
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
|
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
|
||||||
$linkDots = @{
|
$linkDots = @{
|
||||||
"$BASE_WIN\wslconfig" = "$env:UserProfile\.wslconfig"
|
"$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig"
|
||||||
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
|
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
|
||||||
"$BASE_WIN\vsvimrc" = "$Env:Vim\.vsvimrc"
|
"$BASE_WIN\vsvimrc" = "$Env:Vim\.vsvimrc"
|
||||||
"$BASE_WIN\komorebi" = "$env:KOMOREBI_CONFIG_HOME"
|
"$BASE_WIN\komorebi" = "$Env:KOMOREBI_CONFIG_HOME"
|
||||||
"$BASE_COMMON\condarc.yaml" = "$env:XDG_CONFIG_HOME\conda\.condarc"
|
"$BASE_COMMON\condarc.yaml" = "$Env:XDG_CONFIG_HOME\conda\.condarc"
|
||||||
"$BASE_COMMON\gitconfig" = "$env:UserProfile\.gitconfig"
|
"$BASE_COMMON\gitconfig" = "$Env:UserProfile\.gitconfig"
|
||||||
"$BASE_COMMON\glow.yaml" = "$env:AppData\glow\glow.yml"
|
"$BASE_COMMON\glow.yaml" = "$Env:AppData\glow\glow.yml"
|
||||||
"$BASE_COMMON\haskeline" = "$env:UserProfile\.haskeline"
|
"$BASE_COMMON\haskeline" = "$Env:UserProfile\.haskeline"
|
||||||
"$BASE_COMMON\ideavimrc" = "$env:XDG_CONFIG_HOME\ideavim\ideavimrc"
|
"$BASE_COMMON\ideavimrc" = "$Env:XDG_CONFIG_HOME\ideavim\ideavimrc"
|
||||||
"$BASE_COMMON\lesskey" = "$env:LessKeyIn"
|
"$BASE_COMMON\lesskey" = "$Env:LessKeyIn"
|
||||||
"$BASE_COMMON\npmrc" = "$env:NPM_CONFIG_USERCONFIG"
|
"$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG"
|
||||||
"$BASE_COMMON\NuGet.Config" = "$env:AppData\NuGet\NuGet.Config"
|
"$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config"
|
||||||
"$BASE_COMMON\obsidian.vimrc" = "$env:UserProfile\Obsidian\.obsidian.vimrc"
|
"$BASE_COMMON\obsidian.vimrc" = "$Env:UserProfile\Obsidian\.obsidian.vimrc"
|
||||||
"$BASE_COMMON\pip.conf" = "$env:AppData\pip\pip.ini"
|
"$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini"
|
||||||
"$BASE_COMMON\vimrc" = "$env:Vim\_vimrc"
|
"$BASE_COMMON\vimrc" = "$Env:Vim\_vimrc"
|
||||||
"$BASE_TOOLS\ipython" = "$env:IPYTHONDIR"
|
"$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR"
|
||||||
"$BASE_TOOLS\nvim" = "$env:XDG_CONFIG_HOME\nvim"
|
"$BASE_TOOLS\nvim" = "$Env:XDG_CONFIG_HOME\nvim"
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: Auto create directories
|
# TODO: Auto create directories
|
||||||
|
|
@ -35,4 +35,4 @@ foreach ($target in $linkDots.Keys) {
|
||||||
New-Item -ItemType SymbolicLink -Target $target -Path $path -Force
|
New-Item -ItemType SymbolicLink -Target $target -Path $path -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force
|
New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$Env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ nnoremap <leader>rG :action Generate<CR>
|
||||||
|
|
||||||
""" Handling Ctrls """
|
""" Handling Ctrls """
|
||||||
|
|
||||||
|
sethandler <C-C> i:ide
|
||||||
sethandler <C-V> n-v:vim i:ide
|
sethandler <C-V> n-v:vim i:ide
|
||||||
sethandler <C-.> a:ide
|
sethandler <C-.> a:ide
|
||||||
sethandler <A-<CR>> a:ide
|
sethandler <A-<CR>> a:ide
|
||||||
|
|
@ -72,3 +72,5 @@ ${function:wini} = { winget install $args }
|
||||||
${function:winr} = { winget uninstall $args }
|
${function:winr} = { winget uninstall $args }
|
||||||
${function:wins} = { winget search $args }
|
${function:wins} = { winget search $args }
|
||||||
${function:winu} = { winget upgrade $args }
|
${function:winu} = { winget upgrade $args }
|
||||||
|
|
||||||
|
${function:killp} = {ps | ? ProcessName -like $args | kill -Force}
|
||||||
|
|
|
||||||
90
platforms/win/SumatraPDF-shortcuts.txt
Normal file
90
platforms/win/SumatraPDF-shortcuts.txt
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
Shortcuts [
|
||||||
|
[
|
||||||
|
Cmd = CmdToggleBookmark
|
||||||
|
Key = Ctrl + \\
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdRenameFile
|
||||||
|
Key = R
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdFindNext
|
||||||
|
Key = k
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdFindPrev
|
||||||
|
Key = K
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdScrollUp
|
||||||
|
Key = e
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdScrollDown
|
||||||
|
Key = n
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdScrollUpHalfPage
|
||||||
|
Key = E
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdScrollDownHalfPage
|
||||||
|
Key = N
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdScrollRight
|
||||||
|
Key = i
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdInvertColors
|
||||||
|
Key = l
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdPrevTab
|
||||||
|
Key = Shift+H
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdNextTab
|
||||||
|
Key = Shift+I
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdGoToFirstPage
|
||||||
|
Key = g
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdGoToLastPage
|
||||||
|
Key = G
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdGoToPage
|
||||||
|
Key = :
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdRotateLeft
|
||||||
|
Key = {
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdRotateRight
|
||||||
|
Key = }
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdNavigateBack
|
||||||
|
Key = [
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdNavigateForward
|
||||||
|
Key = ]
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdNavigateBack
|
||||||
|
Key = b
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdNavigateForward
|
||||||
|
Key = f
|
||||||
|
]
|
||||||
|
[
|
||||||
|
Cmd = CmdHelpOpenKeyboardShortcuts
|
||||||
|
Key = ?
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
@ -1,33 +1,142 @@
|
||||||
#Requires AutoHotkey v2.0
|
#Requires AutoHotkey v2.0
|
||||||
|
|
||||||
; #b::
|
|
||||||
; Run '"C:\Program Files\Zotero\zotero.exe"'
|
|
||||||
; return
|
|
||||||
|
|
||||||
; #f::
|
|
||||||
; Run '"C:\Program Files\GPSoftware\Directory Opus\dopus.exe"'
|
|
||||||
; return
|
|
||||||
|
|
||||||
; #q::
|
|
||||||
; Send '!{F4}'
|
|
||||||
; return
|
|
||||||
|
|
||||||
; #r::
|
|
||||||
; Run '"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.21.3231.0_x64__8wekyb3d8bbwe\wt.exe"'
|
|
||||||
; return
|
|
||||||
|
|
||||||
#h::
|
#h::
|
||||||
Send '{Left}'
|
{
|
||||||
return
|
Send("{Left}")
|
||||||
|
}
|
||||||
|
|
||||||
#n::
|
#n::
|
||||||
Send '{Down}'
|
{
|
||||||
return
|
Send("{Down}")
|
||||||
|
}
|
||||||
|
|
||||||
#e::
|
#e::
|
||||||
Send '{Up}'
|
{
|
||||||
return
|
Send("{Up}")
|
||||||
|
}
|
||||||
|
|
||||||
#i::
|
#i::
|
||||||
Send '{Right}'
|
{
|
||||||
return
|
Send("{Right}")
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Send("{Home}")
|
||||||
|
}
|
||||||
|
#a:: ; Vim-like navigation: Append
|
||||||
|
{
|
||||||
|
Send("{End}")
|
||||||
|
}
|
||||||
|
|
||||||
|
#q:: ; Simulate cmd+q in macOS
|
||||||
|
{
|
||||||
|
Send("!{F4}")
|
||||||
|
}
|
||||||
|
|
||||||
|
; 定义一个全局状态变量,标记是否触发了组合键
|
||||||
|
global CapsLockState := false
|
||||||
|
|
||||||
|
; 当 CapsLock 作为修饰键与其他键一起使用时
|
||||||
|
CapsLock & s:: {
|
||||||
|
global CapsLockState
|
||||||
|
CapsLockState := true
|
||||||
|
Run("ShareX.exe -RectangleRegion")
|
||||||
|
}
|
||||||
|
|
||||||
|
; 单独按下 CapsLock 时,发送 Esc
|
||||||
|
CapsLock:: {
|
||||||
|
global CapsLockState
|
||||||
|
; 如果之前未使用组合键,则发送 Esc
|
||||||
|
if not CapsLockState {
|
||||||
|
Send("{Esc}")
|
||||||
|
}
|
||||||
|
CapsLockState := false ; 重置状态
|
||||||
|
}
|
||||||
|
|
||||||
|
; 释放 CapsLock 时重置状态
|
||||||
|
*CapsLock Up:: {
|
||||||
|
global CapsLockState
|
||||||
|
CapsLockState := false
|
||||||
|
}
|
||||||
|
|
||||||
|
#HotIf WinActive('ahk_exe' 'QQ.exe')
|
||||||
|
^n::
|
||||||
|
{
|
||||||
|
Send("^{Down}")
|
||||||
|
}
|
||||||
|
^h::
|
||||||
|
{
|
||||||
|
Send("^{Left}")
|
||||||
|
}
|
||||||
|
^i::
|
||||||
|
{
|
||||||
|
Send("^{Enter}")
|
||||||
|
}
|
||||||
|
^e::
|
||||||
|
{
|
||||||
|
Send("^{Up}")
|
||||||
|
}
|
||||||
|
#HotIf WinActive('ahk_exe' 'Weixin.exe')
|
||||||
|
^n::
|
||||||
|
{
|
||||||
|
Send("{Down}")
|
||||||
|
}
|
||||||
|
^e::
|
||||||
|
{
|
||||||
|
Send("{Up}")
|
||||||
|
}
|
||||||
|
#HotIf WinActive('ahk_exe' 'Discord.exe')
|
||||||
|
^n::
|
||||||
|
{
|
||||||
|
Send("^!{Down}")
|
||||||
|
}
|
||||||
|
^e::
|
||||||
|
{
|
||||||
|
Send("^!{Up}")
|
||||||
|
}
|
||||||
|
|
||||||
|
#HotIf WinActive('ahk_exe' 'olk.exe')
|
||||||
|
^n::
|
||||||
|
{
|
||||||
|
Send("{Down}")
|
||||||
|
}
|
||||||
|
^+n::
|
||||||
|
{
|
||||||
|
Send("^.")
|
||||||
|
}
|
||||||
|
^+e::
|
||||||
|
{
|
||||||
|
Send("^,")
|
||||||
|
}
|
||||||
|
^e::
|
||||||
|
{
|
||||||
|
Send("{Up}")
|
||||||
|
}
|
||||||
|
#HotIf WinActive('ahk_exe' 'SumatraPDF.exe')
|
||||||
|
^\::
|
||||||
|
{
|
||||||
|
Send("{F12}")
|
||||||
|
}
|
||||||
|
#HotIf WinActive('ahk_exe' 'Flow.Launcher.exe')
|
||||||
|
^a::
|
||||||
|
{
|
||||||
|
Send("{End}")
|
||||||
|
}
|
||||||
|
^+a::
|
||||||
|
{
|
||||||
|
Send("^a")
|
||||||
|
}
|
||||||
|
^l::
|
||||||
|
{
|
||||||
|
Send("{Home}")
|
||||||
|
}
|
||||||
|
^+BackSpace::
|
||||||
|
{
|
||||||
|
Send("^a{Backspace}")
|
||||||
|
}
|
||||||
|
#HotIf WinActive('ahk_exe' 'Obsidian.exe')
|
||||||
|
^e::
|
||||||
|
{
|
||||||
|
Send("^p")
|
||||||
|
}
|
||||||
|
#HotIf
|
||||||
65
themes/alacritty-catppuccin-frappe.toml
Normal file
65
themes/alacritty-catppuccin-frappe.toml
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
[colors.primary]
|
||||||
|
background = "#303446"
|
||||||
|
foreground = "#c6d0f5"
|
||||||
|
dim_foreground = "#838ba7"
|
||||||
|
bright_foreground = "#c6d0f5"
|
||||||
|
|
||||||
|
[colors.cursor]
|
||||||
|
text = "#303446"
|
||||||
|
cursor = "#f2d5cf"
|
||||||
|
|
||||||
|
[colors.vi_mode_cursor]
|
||||||
|
text = "#303446"
|
||||||
|
cursor = "#babbf1"
|
||||||
|
|
||||||
|
[colors.search.matches]
|
||||||
|
foreground = "#303446"
|
||||||
|
background = "#a5adce"
|
||||||
|
|
||||||
|
[colors.search.focused_match]
|
||||||
|
foreground = "#303446"
|
||||||
|
background = "#a6d189"
|
||||||
|
|
||||||
|
[colors.footer_bar]
|
||||||
|
foreground = "#303446"
|
||||||
|
background = "#a5adce"
|
||||||
|
|
||||||
|
[colors.hints.start]
|
||||||
|
foreground = "#303446"
|
||||||
|
background = "#e5c890"
|
||||||
|
|
||||||
|
[colors.hints.end]
|
||||||
|
foreground = "#303446"
|
||||||
|
background = "#a5adce"
|
||||||
|
|
||||||
|
[colors.selection]
|
||||||
|
text = "#303446"
|
||||||
|
background = "#f2d5cf"
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = "#51576d"
|
||||||
|
red = "#e78284"
|
||||||
|
green = "#a6d189"
|
||||||
|
yellow = "#e5c890"
|
||||||
|
blue = "#8caaee"
|
||||||
|
magenta = "#f4b8e4"
|
||||||
|
cyan = "#81c8be"
|
||||||
|
white = "#b5bfe2"
|
||||||
|
|
||||||
|
[colors.bright]
|
||||||
|
black = "#626880"
|
||||||
|
red = "#e78284"
|
||||||
|
green = "#a6d189"
|
||||||
|
yellow = "#e5c890"
|
||||||
|
blue = "#8caaee"
|
||||||
|
magenta = "#f4b8e4"
|
||||||
|
cyan = "#81c8be"
|
||||||
|
white = "#a5adce"
|
||||||
|
|
||||||
|
[[colors.indexed_colors]]
|
||||||
|
index = 16
|
||||||
|
color = "#ef9f76"
|
||||||
|
|
||||||
|
[[colors.indexed_colors]]
|
||||||
|
index = 17
|
||||||
|
color = "#f2d5cf"
|
||||||
149
themes/flowlauncher-catppuccin-frappe.xaml
Normal file
149
themes/flowlauncher-catppuccin-frappe.xaml
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
<ResourceDictionary
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/Themes/Win11Light.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
<Style
|
||||||
|
x:Key="ItemBulletSelectedStyle"
|
||||||
|
BasedOn="{StaticResource ItemBulletSelectedStyle}"
|
||||||
|
TargetType="{x:Type Border}">
|
||||||
|
<Setter Property="Background" Value="#ca9ee6" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="ItemGlyph"
|
||||||
|
BasedOn="{StaticResource ItemGlyph}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#a5adce" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="QueryBoxStyle"
|
||||||
|
BasedOn="{StaticResource QueryBoxStyle}"
|
||||||
|
TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||||
|
<Setter Property="CaretBrush" Value="#c6d0f5" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="QuerySuggestionBoxStyle"
|
||||||
|
BasedOn="{StaticResource QuerySuggestionBoxStyle}"
|
||||||
|
TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="Foreground" Value="#a5adce" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style
|
||||||
|
x:Key="WindowBorderStyle"
|
||||||
|
BasedOn="{StaticResource WindowBorderStyle}"
|
||||||
|
TargetType="{x:Type Border}">
|
||||||
|
<Setter Property="BorderBrush" Value="#414559" />
|
||||||
|
<Setter Property="Background" Value="#303446" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Item Style -->
|
||||||
|
<Style
|
||||||
|
x:Key="ItemTitleStyle"
|
||||||
|
BasedOn="{StaticResource ItemTitleStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#b5bfe2" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="ItemSubTitleStyle"
|
||||||
|
BasedOn="{StaticResource ItemSubTitleStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#a5adce" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="SeparatorStyle"
|
||||||
|
BasedOn="{StaticResource SeparatorStyle}"
|
||||||
|
TargetType="{x:Type Rectangle}">
|
||||||
|
<Setter Property="Fill" Value="#626880" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="ItemTitleSelectedStyle"
|
||||||
|
BasedOn="{StaticResource ItemTitleSelectedStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="ItemSubTitleSelectedStyle"
|
||||||
|
BasedOn="{StaticResource ItemSubTitleSelectedStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#b5bfe2" />
|
||||||
|
</Style>
|
||||||
|
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#414559</SolidColorBrush>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- button style in the middle of the scrollbar -->
|
||||||
|
<Style
|
||||||
|
x:Key="ThumbStyle"
|
||||||
|
BasedOn="{StaticResource ThumbStyle}"
|
||||||
|
TargetType="{x:Type Thumb}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||||
|
<Border
|
||||||
|
Background="#414559"
|
||||||
|
BorderBrush="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
|
CornerRadius="2"
|
||||||
|
DockPanel.Dock="Right" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="SearchIconStyle"
|
||||||
|
BasedOn="{StaticResource SearchIconStyle}"
|
||||||
|
TargetType="{x:Type Path}">
|
||||||
|
<Setter Property="Fill" Value="#949cbb" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="SearchIconPosition" BasedOn="{StaticResource SearchIconPosition}" TargetType="{x:Type Canvas}">
|
||||||
|
<Setter Property="Background" Value="#303446" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ItemHotkeyStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#737994" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#ca9ee6" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ItemGlyphSelectedStyle" BasedOn="{StaticResource ItemGlyphSelectedStyle}" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#c6d0f5" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="ClockBox"
|
||||||
|
BasedOn="{StaticResource ClockBox}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#a5adce" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="DateBox"
|
||||||
|
BasedOn="{StaticResource DateBox}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#a5adce" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="PreviewBorderStyle"
|
||||||
|
BasedOn="{StaticResource PreviewBorderStyle}"
|
||||||
|
TargetType="{x:Type Border}">
|
||||||
|
<Setter Property="BorderBrush" Value="#303446" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="PreviewItemTitleStyle"
|
||||||
|
BasedOn="{StaticResource PreviewItemTitleStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#8caaee" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="PreviewItemSubTitleStyle"
|
||||||
|
BasedOn="{StaticResource PreviewItemSubTitleStyle}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#51576d" />
|
||||||
|
</Style>
|
||||||
|
<Style
|
||||||
|
x:Key="PreviewGlyph"
|
||||||
|
BasedOn="{StaticResource PreviewGlyph}"
|
||||||
|
TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#8caaee" />
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
" Put this in OBSIDIAN_VAULT/.obsidian.vimrc
|
" Put this in OBSIDIAN_VAULT/.obsidian.vimrc
|
||||||
set clipboard=unnamed " Sync with System Clipboard
|
set clipboard=unnamed " Sync with System Clipboard
|
||||||
|
|
||||||
" Word wrap
|
" Colemak vim-like
|
||||||
noremap n gj
|
noremap n j
|
||||||
noremap e gk
|
noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
|
|
@ -31,11 +31,21 @@ vnoremap * :addbold<CR> " Add bold to selection
|
||||||
vnoremap _ :additalic<CR> " Add italic to selection
|
vnoremap _ :additalic<CR> " Add italic to selection
|
||||||
vnoremap = :addhighlight " Add highlight to selection
|
vnoremap = :addhighlight " Add highlight to selection
|
||||||
|
|
||||||
|
""" Commands
|
||||||
|
exmap write editor:save-file
|
||||||
|
exmap w editor:save-file
|
||||||
|
exmap q workspace:close-tab-group
|
||||||
|
|
||||||
exmap prevtab obcommand workspace:previous-tab
|
exmap prevtab obcommand workspace:previous-tab
|
||||||
exmap nexttab obcommand workspace:next-tab
|
exmap nexttab obcommand workspace:next-tab
|
||||||
nnoremap H :prevtab<CR>
|
nnoremap H :prevtab<CR>
|
||||||
nnoremap I :nexttab<CR>
|
nnoremap I :nexttab<CR>
|
||||||
|
|
||||||
|
exmap prevhist obcommand app:go-back
|
||||||
|
exmap nexthist obcommand app:go-forward
|
||||||
|
nnoremap gh :prevhist<CR>
|
||||||
|
nnoremap gi :nexthist<CR>
|
||||||
|
|
||||||
exmap reload :source .obsidian.vimrc<CR>
|
exmap reload :source .obsidian.vimrc<CR>
|
||||||
|
|
||||||
unmap <Space>
|
unmap <Space>
|
||||||
|
|
@ -48,12 +58,54 @@ map <Space>- :hsplit<CR>
|
||||||
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
||||||
map <Space>ai :chat<CR>
|
map <Space>ai :chat<CR>
|
||||||
|
|
||||||
exmap omnisearch obcommand omnisearch:show-modal
|
|
||||||
map <Space><Space> :omnisearch<CR>
|
|
||||||
|
|
||||||
exmap command-palette obcommand command-palette:open
|
|
||||||
map <Space>: :command-palette<CR>
|
|
||||||
|
|
||||||
""" g-commands
|
""" g-commands
|
||||||
exmap tsource obcommand editor:toggle-source
|
exmap tsource obcommand editor:toggle-source
|
||||||
|
exmap tpreview obcommand markdown:toggle-preview
|
||||||
nnoremap gs :tsource<CR>
|
nnoremap gs :tsource<CR>
|
||||||
|
nnoremap gp :tpreview<CR>
|
||||||
|
|
||||||
|
exmap wl obcommand editor:focus-left
|
||||||
|
exmap wr obcommand editor:focus-right
|
||||||
|
exmap wt obcommand editor:focus-top
|
||||||
|
exmap wb obcommand editor:focus-bottom
|
||||||
|
|
||||||
|
map <Space>h :wl<CR>
|
||||||
|
map <Space>i :wr<CR>
|
||||||
|
map <Space>n :wb<CR>
|
||||||
|
map <Space>e :wt<CR>
|
||||||
|
|
||||||
|
exmap FoldToggle obcommand editor:toggle-fold
|
||||||
|
exmap FoldLess obcommand editor:fold-less
|
||||||
|
exmap FoldMore obcommand editor:fold-more
|
||||||
|
exmap FoldAll obcommand editor:fold-all
|
||||||
|
exmap UnfoldAll obcommand editor:unfold-all
|
||||||
|
nnoremap za :FoldToggle<CR>
|
||||||
|
nnoremap zr :FoldLess<CR>
|
||||||
|
nnoremap zm :FoldMore<CR>
|
||||||
|
nnoremap zM :FoldAll<CR>
|
||||||
|
nnoremap zR :UnfoldAll<CR>
|
||||||
|
|
||||||
|
exmap switchany obcommand darlal-switcher-plus:switcher-plus:open
|
||||||
|
exmap switchcmd obcommand darlal-switcher-plus:switcher-plus:open-commands
|
||||||
|
exmap switchrecent obcommand darlal-switcher-plus:switcher-plus:open-related-items
|
||||||
|
map <Space><Space> :switchany<CR>
|
||||||
|
map <Space>: :switchcmd<CR>
|
||||||
|
map <Space>fr :switchrecent<CR>
|
||||||
|
|
||||||
|
" <leader>b : +buffer
|
||||||
|
exmap bd obcommand
|
||||||
|
exmap DeleteOthers obcommand workspace:close-others
|
||||||
|
map <Space>bd :bd<CR>
|
||||||
|
map <Space>bX :DeleteOthers<CR>
|
||||||
|
|
||||||
|
" <leader>m : +major/markdown
|
||||||
|
exmap addCallout obcommand editor:insert-callout
|
||||||
|
map <Space>mb :addbold<CR>
|
||||||
|
map <Space>mi :additalic<CR>
|
||||||
|
map <Space>mc :addcode<CR>
|
||||||
|
map <Space>md :adddel<CR>
|
||||||
|
map <Space>mh :addhighlight<CR>
|
||||||
|
map <Space>mp :tpreview<CR>
|
||||||
|
map <Space>mo :addCallout<CR>
|
||||||
|
|
|
||||||
|
|
@ -1,487 +1,487 @@
|
||||||
// Place your key bindings in this file to override the defaultsauto[]
|
// Place your key bindings in this file to override the defaultsauto[]
|
||||||
[
|
[
|
||||||
// #region quickOpen (Telescope)
|
// #region quickOpen (Telescope)
|
||||||
{ // <leader> <space> Telescope emulator
|
{ // <leader> <space> Telescope emulator
|
||||||
"key": "space space",
|
"key": "space space",
|
||||||
"command": "workbench.action.quickOpen",
|
"command": "workbench.action.quickOpen",
|
||||||
"when": "!editorFocus && !inputFocus"
|
"when": "!editorFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+p",
|
"key": "ctrl+p",
|
||||||
"command": "workbench.action.quickOpen"
|
"command": "workbench.action.quickOpen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+e",
|
"key": "ctrl+e",
|
||||||
"command": "workbench.action.quickOpenNavigatePrevious",
|
"command": "workbench.action.quickOpenNavigatePrevious",
|
||||||
"when": "inQuickOpen"
|
"when": "inQuickOpen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+n",
|
"key": "ctrl+n",
|
||||||
"command": "workbench.action.quickOpenNavigateNext",
|
"command": "workbench.action.quickOpenNavigateNext",
|
||||||
"when": "inQuickOpen"
|
"when": "inQuickOpen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+[",
|
"key": "ctrl+[",
|
||||||
"command": "workbench.action.closeQuickOpen",
|
"command": "workbench.action.closeQuickOpen",
|
||||||
"when": "inQuickOpen"
|
"when": "inQuickOpen"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
// #region plugin: code runner
|
// #region plugin: code runner
|
||||||
{
|
{
|
||||||
"key": "ctrl+alt+n",
|
"key": "ctrl+alt+n",
|
||||||
"command": "-code-runner.run"
|
"command": "-code-runner.run"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
// #region Comment and semicolons
|
// #region Comment and semicolons
|
||||||
{
|
{
|
||||||
"key": "ctrl+oem_1", // ctrl+;
|
"key": "ctrl+oem_1", // ctrl+;
|
||||||
"command": "extension.insertSemicolon",
|
"command": "extension.insertSemicolon",
|
||||||
"when": "editorTextFocus"
|
"when": "editorTextFocus"
|
||||||
},
|
},
|
||||||
{ // change to toggle comment
|
{ // change to toggle comment
|
||||||
"key": "ctrl+oem_2", // ctrl+/;
|
"key": "ctrl+oem_2", // ctrl+/;
|
||||||
"command": "-extension.insertSemicolon",
|
"command": "-extension.insertSemicolon",
|
||||||
"when": "editorTextFocus"
|
"when": "editorTextFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+oem_1",
|
"key": "ctrl+shift+oem_1",
|
||||||
"command": "extension.insertSemicolonWithNewLine",
|
"command": "extension.insertSemicolonWithNewLine",
|
||||||
"when": "editorTextFocus"
|
"when": "editorTextFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+oem_2",
|
"key": "ctrl+shift+oem_2",
|
||||||
"command": "-extension.insertSemicolonWithNewLine",
|
"command": "-extension.insertSemicolonWithNewLine",
|
||||||
"when": "editorTextFocus"
|
"when": "editorTextFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+oem_2",
|
"key": "ctrl+shift+oem_2",
|
||||||
"command": "github.copilot.acceptCursorPanelSolution",
|
"command": "github.copilot.acceptCursorPanelSolution",
|
||||||
"when": "github.copilot.activated && github.copilot.panelVisible"
|
"when": "github.copilot.activated && github.copilot.panelVisible"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+oem_2",
|
"key": "ctrl+oem_2",
|
||||||
"command": "-github.copilot.acceptCursorPanelSolution",
|
"command": "-github.copilot.acceptCursorPanelSolution",
|
||||||
"when": "github.copilot.activated && github.copilot.panelVisible"
|
"when": "github.copilot.activated && github.copilot.panelVisible"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
{
|
{
|
||||||
"key": "f9",
|
"key": "f9",
|
||||||
"command": "csdevkit.debug.noDebugFileLaunch"
|
"command": "csdevkit.debug.noDebugFileLaunch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+h",
|
"key": "ctrl+h",
|
||||||
"command": "-editor.action.startFindReplaceAction",
|
"command": "-editor.action.startFindReplaceAction",
|
||||||
"when": "editorFocus || editorIsOpen"
|
"when": "editorFocus || editorIsOpen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+h",
|
"key": "ctrl+h",
|
||||||
"command": "-extension.vim_ctrl+h",
|
"command": "-extension.vim_ctrl+h",
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
|
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+r",
|
"key": "ctrl+r",
|
||||||
"command": "-workbench.action.reloadWindow",
|
"command": "-workbench.action.reloadWindow",
|
||||||
"when": "isDevelopment"
|
"when": "isDevelopment"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+alt+r",
|
"key": "ctrl+alt+r",
|
||||||
"command": "-workbench.action.terminal.runRecentCommand",
|
"command": "-workbench.action.terminal.runRecentCommand",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled"
|
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+r",
|
"key": "ctrl+r",
|
||||||
"command": "-workbench.action.terminal.runRecentCommand",
|
"command": "-workbench.action.terminal.runRecentCommand",
|
||||||
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
|
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+r",
|
"key": "ctrl+shift+r",
|
||||||
"command": "-rerunSearchEditorSearch",
|
"command": "-rerunSearchEditorSearch",
|
||||||
"when": "inSearchEditor"
|
"when": "inSearchEditor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+r",
|
"key": "ctrl+shift+r",
|
||||||
"command": "-editor.action.refactor",
|
"command": "-editor.action.refactor",
|
||||||
"when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly"
|
"when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+r",
|
"key": "ctrl+shift+r",
|
||||||
"command": "-workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
|
"command": "-workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
|
||||||
"when": "inQuickOpen && inRecentFilesPicker"
|
"when": "inQuickOpen && inRecentFilesPicker"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+e",
|
"key": "ctrl+e",
|
||||||
"command": "cursorEnd",
|
"command": "cursorEnd",
|
||||||
"when": "textInputFocus"
|
"when": "textInputFocus"
|
||||||
},
|
},
|
||||||
// #region Nvim-Tree like File Explorer
|
// #region Nvim-Tree like File Explorer
|
||||||
// n, e : move cursor up/down
|
// n, e : move cursor up/down
|
||||||
// h : move cursor to parent folder
|
// h : move cursor to parent folder
|
||||||
// i : open file or folder
|
// i : open file or folder
|
||||||
{
|
{
|
||||||
"key": "e",
|
"key": "e",
|
||||||
"command": "list.focusUp",
|
"command": "list.focusUp",
|
||||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "k",
|
"key": "k",
|
||||||
"command": "-list.focusUp",
|
"command": "-list.focusUp",
|
||||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "e",
|
"key": "e",
|
||||||
"command": "list.focusUp",
|
"command": "list.focusUp",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "k",
|
"key": "k",
|
||||||
"command": "-list.focusUp",
|
"command": "-list.focusUp",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "f",
|
"key": "f",
|
||||||
"command": "filesExplorer.findInWorkspace",
|
"command": "filesExplorer.findInWorkspace",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "n",
|
"key": "n",
|
||||||
"command": "list.focusDown",
|
"command": "list.focusDown",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "j",
|
"key": "j",
|
||||||
"command": "-list.focusDown",
|
"command": "-list.focusDown",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "i",
|
"key": "i",
|
||||||
"command": "list.select",
|
"command": "list.select",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "l",
|
"key": "l",
|
||||||
"command": "-list.select",
|
"command": "-list.select",
|
||||||
"when": "listFocus && !inputFocus"
|
"when": "listFocus && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // z: Close all folders
|
{ // z: Close all folders
|
||||||
"key": "z",
|
"key": "z",
|
||||||
"command": "workbench.files.action.collapseExplorerFolders",
|
"command": "workbench.files.action.collapseExplorerFolders",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // <leader>e: Close left sidebar if is in file explorer
|
{ // <leader>e: Close left sidebar if is in file explorer
|
||||||
"key": "space e",
|
"key": "space e",
|
||||||
"command": "workbench.action.toggleSidebarVisibility",
|
"command": "workbench.action.toggleSidebarVisibility",
|
||||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && filesExplorerFocus"
|
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && filesExplorerFocus"
|
||||||
},
|
},
|
||||||
{ // <leader>e: Focus on file explorer if is on sidebar and not in file explorer
|
{ // <leader>e: Focus on file explorer if is on sidebar and not in file explorer
|
||||||
"key": "space e",
|
"key": "space e",
|
||||||
"command": "workbench.files.action.focusFilesExplorer",
|
"command": "workbench.files.action.focusFilesExplorer",
|
||||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !filesExplorerFocus"
|
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !filesExplorerFocus"
|
||||||
},
|
},
|
||||||
{ // <leader>g: Focus on file explorer if is on sidebar and not in file explorer
|
{ // <leader>g: Focus on file explorer if is on sidebar and not in file explorer
|
||||||
"key": "space g",
|
"key": "space g",
|
||||||
"command": "workbench.scm.focus",
|
"command": "workbench.scm.focus",
|
||||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !scmViewletVisible"
|
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !scmViewletVisible"
|
||||||
},
|
},
|
||||||
{ // a: add
|
{ // a: add
|
||||||
"key": "a",
|
"key": "a",
|
||||||
"command": "explorer.newFile",
|
"command": "explorer.newFile",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // p: paste
|
{ // p: paste
|
||||||
"key": "p",
|
"key": "p",
|
||||||
"command": "filesExplorer.paste",
|
"command": "filesExplorer.paste",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // x: cut
|
{ // x: cut
|
||||||
"key": "x",
|
"key": "x",
|
||||||
"command": "filesExplorer.cut",
|
"command": "filesExplorer.cut",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // d: delete
|
{ // d: delete
|
||||||
"key": "d",
|
"key": "d",
|
||||||
"command": "deleteFile",
|
"command": "deleteFile",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // r: rename
|
{ // r: rename
|
||||||
"key": "r",
|
"key": "r",
|
||||||
"command": "renameFile",
|
"command": "renameFile",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // s: open in vertical split / to side
|
{ // s: open in vertical split / to side
|
||||||
"key": "s",
|
"key": "s",
|
||||||
"command": "explorer.openToSide",
|
"command": "explorer.openToSide",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // A: add folder
|
{ // A: add folder
|
||||||
"key": "shift+a",
|
"key": "shift+a",
|
||||||
"command": "explorer.newFolder",
|
"command": "explorer.newFolder",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // C: Copy path
|
{ // C: Copy path
|
||||||
"key": "shift+c",
|
"key": "shift+c",
|
||||||
"command": "copyFilePath",
|
"command": "copyFilePath",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // E: Open in File Explorer
|
{ // E: Open in File Explorer
|
||||||
"key": "shift+e",
|
"key": "shift+e",
|
||||||
"command": "revealFileInOS",
|
"command": "revealFileInOS",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // E: Open in File Explorer (WSL)
|
{ // E: Open in File Explorer (WSL)
|
||||||
"key": "shift+e",
|
"key": "shift+e",
|
||||||
"command": "remote-wsl.revealInExplorer",
|
"command": "remote-wsl.revealInExplorer",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus && remoteName == 'wsl'"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus && remoteName == 'wsl'"
|
||||||
},
|
},
|
||||||
{ // O: Open with System App
|
{ // O: Open with System App
|
||||||
"key": "shift+o",
|
"key": "shift+o",
|
||||||
"command": "openInExternalApp.open",
|
"command": "openInExternalApp.open",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // Y: Copy Relative Path
|
{ // Y: Copy Relative Path
|
||||||
"key": "shift+y",
|
"key": "shift+y",
|
||||||
"command": "copyRelativeFilePath",
|
"command": "copyRelativeFilePath",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // R: Copy Relative Path
|
{ // R: Copy Relative Path
|
||||||
"key": "shift+r",
|
"key": "shift+r",
|
||||||
"command": "workbench.files.action.refreshFilesExplorer",
|
"command": "workbench.files.action.refreshFilesExplorer",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
{ // T: Open in terminal
|
{ // T: Open in terminal
|
||||||
"key": "shift+t",
|
"key": "shift+t",
|
||||||
"command": "openInIntegratedTerminal",
|
"command": "openInIntegratedTerminal",
|
||||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
{
|
{
|
||||||
"key": "ctrl+p",
|
"key": "ctrl+p",
|
||||||
"command": "workbench.action.files.openFileFolder",
|
"command": "workbench.action.files.openFileFolder",
|
||||||
"when": "isMacNative && openFolderWorkspaceSupport"
|
"when": "isMacNative && openFolderWorkspaceSupport"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+o",
|
"key": "ctrl+o",
|
||||||
"command": "-workbench.action.files.openFileFolder",
|
"command": "-workbench.action.files.openFileFolder",
|
||||||
"when": "isMacNative && openFolderWorkspaceSupport"
|
"when": "isMacNative && openFolderWorkspaceSupport"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+p",
|
"key": "ctrl+p",
|
||||||
"command": "-extension.vim_ctrl+p",
|
"command": "-extension.vim_ctrl+p",
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
|
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+o",
|
"key": "ctrl+o",
|
||||||
"command": "-workbench.action.files.openFolderViaWorkspace",
|
"command": "-workbench.action.files.openFolderViaWorkspace",
|
||||||
"when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'"
|
"when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'"
|
||||||
},
|
},
|
||||||
// #region Vim-like Hover Browsing
|
// #region Vim-like Hover Browsing
|
||||||
{
|
{
|
||||||
"key": "h",
|
"key": "h",
|
||||||
"command": "editor.action.scrollLeftHover",
|
"command": "editor.action.scrollLeftHover",
|
||||||
"when": "editorHoverFocused"
|
"when": "editorHoverFocused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "n",
|
"key": "n",
|
||||||
"command": "editor.action.scrollDownHover",
|
"command": "editor.action.scrollDownHover",
|
||||||
"when": "editorHoverFocused"
|
"when": "editorHoverFocused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "e",
|
"key": "e",
|
||||||
"command": "editor.action.scrollUpHover",
|
"command": "editor.action.scrollUpHover",
|
||||||
"when": "editorHoverFocused"
|
"when": "editorHoverFocused"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "i",
|
"key": "i",
|
||||||
"command": "editor.action.scrollRightHover",
|
"command": "editor.action.scrollRightHover",
|
||||||
"when": "editorHoverFocused"
|
"when": "editorHoverFocused"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
// #region Vim-like Jupyter Navigation
|
// #region Vim-like Jupyter Navigation
|
||||||
{
|
{
|
||||||
"key": "n",
|
"key": "n",
|
||||||
"command": "notebook.focusNextEditor",
|
"command": "notebook.focusNextEditor",
|
||||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "j",
|
"key": "j",
|
||||||
"command": "-notebook.focusNextEditor",
|
"command": "-notebook.focusNextEditor",
|
||||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "e",
|
"key": "e",
|
||||||
"command": "notebook.focusPreviousEditor",
|
"command": "notebook.focusPreviousEditor",
|
||||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "k",
|
"key": "k",
|
||||||
"command": "-notebook.focusPreviousEditor",
|
"command": "-notebook.focusPreviousEditor",
|
||||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+g c",
|
"key": "ctrl+shift+g c",
|
||||||
"command": "-gitlens.showQuickCommitFileDetails",
|
"command": "-gitlens.showQuickCommitFileDetails",
|
||||||
"when": "editorTextFocus && !gitlens:disabled && config.gitlens.keymap == 'chorded'"
|
"when": "editorTextFocus && !gitlens:disabled && config.gitlens.keymap == 'chorded'"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+g s",
|
"key": "ctrl+shift+g s",
|
||||||
"command": "git.stageAll"
|
"command": "git.stageAll"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+g g",
|
"key": "ctrl+shift+g g",
|
||||||
"command": "workbench.view.scm",
|
"command": "workbench.view.scm",
|
||||||
"when": "workbench.scm.active"
|
"when": "workbench.scm.active"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+shift+g",
|
"key": "ctrl+shift+g",
|
||||||
"command": "-workbench.view.scm",
|
"command": "-workbench.view.scm",
|
||||||
"when": "workbench.scm.active"
|
"when": "workbench.scm.active"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+k ctrl+shift+b",
|
"key": "ctrl+k ctrl+shift+b",
|
||||||
"command": "editor.action.goToSelectionAnchor"
|
"command": "editor.action.goToSelectionAnchor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+k ctrl+shift+i",
|
"key": "ctrl+k ctrl+shift+i",
|
||||||
"command": "workbench.action.selectProductIconTheme"
|
"command": "workbench.action.selectProductIconTheme"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+l p",
|
"key": "ctrl+l p",
|
||||||
"command": "-extension.openPrGitProvider"
|
"command": "-extension.openPrGitProvider"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+l g",
|
"key": "ctrl+l g",
|
||||||
"command": "-extension.openInGitHub"
|
"command": "-extension.openInGitHub"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+l c",
|
"key": "ctrl+l c",
|
||||||
"command": "-extension.copyGitHubLinkToClipboard"
|
"command": "-extension.copyGitHubLinkToClipboard"
|
||||||
},
|
},
|
||||||
// #region Use ^n ^e to navigate completions
|
// #region Use ^n ^e to navigate completions
|
||||||
{
|
{
|
||||||
"key": "ctrl+n",
|
"key": "ctrl+n",
|
||||||
"command": "workbench.action.files.newUntitledFile",
|
"command": "workbench.action.files.newUntitledFile",
|
||||||
"when": "!suggestWidgetVisible && !inQuickOpen"
|
"when": "!suggestWidgetVisible && !inQuickOpen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+n",
|
"key": "ctrl+n",
|
||||||
"command": "-workbench.action.files.newUntitledFile"
|
"command": "-workbench.action.files.newUntitledFile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+n",
|
"key": "ctrl+n",
|
||||||
"command": "selectNextSuggestion",
|
"command": "selectNextSuggestion",
|
||||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+e",
|
"key": "ctrl+e",
|
||||||
"command": "selectPrevSuggestion",
|
"command": "selectPrevSuggestion",
|
||||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
// #region Terminal Control, use ^a as prefix / leader key
|
// #region Terminal Control, use ^a as prefix / leader key
|
||||||
// tmux-like terminal control
|
// tmux-like terminal control
|
||||||
{ // prefix + x : kill terminal
|
{ // prefix + x : kill terminal
|
||||||
"key": "ctrl+a x",
|
"key": "ctrl+a x",
|
||||||
"command": "workbench.action.terminal.kill",
|
"command": "workbench.action.terminal.kill",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + c : create new terminal
|
{ // prefix + c : create new terminal
|
||||||
"key": "ctrl+a c",
|
"key": "ctrl+a c",
|
||||||
"command": "workbench.action.terminal.new",
|
"command": "workbench.action.terminal.new",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + | : split terminal vertically
|
{ // prefix + | : split terminal vertically
|
||||||
"key": "ctrl+a shift+\\",
|
"key": "ctrl+a shift+\\",
|
||||||
"command": "workbench.action.terminal.split",
|
"command": "workbench.action.terminal.split",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + \ : split terminal vertically
|
{ // prefix + \ : split terminal vertically
|
||||||
"key": "ctrl+a \\",
|
"key": "ctrl+a \\",
|
||||||
"command": "workbench.action.terminal.split",
|
"command": "workbench.action.terminal.split",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + / : search
|
{ // prefix + / : search
|
||||||
"key": "ctrl+a /",
|
"key": "ctrl+a /",
|
||||||
"command": "workbench.action.terminal.focusFind",
|
"command": "workbench.action.terminal.focusFind",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + t : toggle terminal
|
{ // prefix + t : toggle terminal
|
||||||
"key": "ctrl+a t",
|
"key": "ctrl+a t",
|
||||||
"command": "workbench.action.terminal.toggleTerminal",
|
"command": "workbench.action.terminal.toggleTerminal",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + ^a: show information
|
{ // prefix + ^a: show information
|
||||||
"key": "ctrl+a ctrl+a",
|
"key": "ctrl+a ctrl+a",
|
||||||
"command": "workbench.action.terminal.focusHover",
|
"command": "workbench.action.terminal.focusHover",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+k ctrl+i",
|
"key": "ctrl+k ctrl+i",
|
||||||
"command": "-workbench.action.terminal.focusHover",
|
"command": "-workbench.action.terminal.focusHover",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + 1 : focus terminal 1
|
{ // prefix + 1 : focus terminal 1
|
||||||
"key": "ctrl+a 1",
|
"key": "ctrl+a 1",
|
||||||
"command": "workbench.action.terminal.focusAtIndex1",
|
"command": "workbench.action.terminal.focusAtIndex1",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + 2 : focus terminal 2
|
{ // prefix + 2 : focus terminal 2
|
||||||
"key": "ctrl+a 2",
|
"key": "ctrl+a 2",
|
||||||
"command": "workbench.action.terminal.focusAtIndex2",
|
"command": "workbench.action.terminal.focusAtIndex2",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + 3 : focus terminal 3
|
{ // prefix + 3 : focus terminal 3
|
||||||
"key": "ctrl+a 3",
|
"key": "ctrl+a 3",
|
||||||
"command": "workbench.action.terminal.focusAtIndex3",
|
"command": "workbench.action.terminal.focusAtIndex3",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||||
},
|
},
|
||||||
{ // prefix + g : Go to recent directory
|
{ // prefix + g : Go to recent directory
|
||||||
"key": "ctrl+a g",
|
"key": "ctrl+a g",
|
||||||
"command": "workbench.action.terminal.goToRecentDirectory",
|
"command": "workbench.action.terminal.goToRecentDirectory",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+g",
|
"key": "ctrl+g",
|
||||||
"command": "-workbench.action.terminal.goToRecentDirectory",
|
"command": "-workbench.action.terminal.goToRecentDirectory",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{ // prefix + d : detach terminal
|
{ // prefix + d : detach terminal
|
||||||
"key": "ctrl+a d",
|
"key": "ctrl+a d",
|
||||||
"command": "workbench.action.terminal.detachSession",
|
"command": "workbench.action.terminal.detachSession",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{ // prefix + a : attach to session
|
{ // prefix + a : attach to session
|
||||||
"key": "ctrl+a a",
|
"key": "ctrl+a a",
|
||||||
"command": "workbench.action.terminal.attachToSession",
|
"command": "workbench.action.terminal.attachToSession",
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a h",
|
"key": "ctrl+a h",
|
||||||
"command": "workbench.action.terminal.focusPreviousPane",
|
"command": "workbench.action.terminal.focusPreviousPane",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a i",
|
"key": "ctrl+a i",
|
||||||
"command": "workbench.action.terminal.focusNextPane",
|
"command": "workbench.action.terminal.focusNextPane",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a shift+H",
|
"key": "ctrl+a shift+H",
|
||||||
"command": "workbench.action.terminal.resizePaneLeft",
|
"command": "workbench.action.terminal.resizePaneLeft",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a shift+N",
|
"key": "ctrl+a shift+N",
|
||||||
"command": "workbench.action.terminal.resizePaneDown",
|
"command": "workbench.action.terminal.resizePaneDown",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a shift+E",
|
"key": "ctrl+a shift+E",
|
||||||
"command": "workbench.action.terminal.resizePaneUp",
|
"command": "workbench.action.terminal.resizePaneUp",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+a shift+I",
|
"key": "ctrl+a shift+I",
|
||||||
"command": "workbench.action.terminal.resizePaneRight",
|
"command": "workbench.action.terminal.resizePaneRight",
|
||||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -30,9 +30,11 @@ noremap J E
|
||||||
noremap Y y$
|
noremap Y y$
|
||||||
|
|
||||||
" 分词版本的w和b,支持中文,需要插件
|
" 分词版本的w和b,支持中文,需要插件
|
||||||
|
" 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap`
|
||||||
|
" 由于 VSCode Vim 的限制,递归解析存在缺陷,目前这种情况,2w 符合预期,但 dw 不符合预期
|
||||||
" Comment if you don't use cjk or the plugin
|
" Comment if you don't use cjk or the plugin
|
||||||
noremap w cjkWordHandler.cursorWordEndRight
|
nmap w cjkWordHandler.cursorWordEndRight
|
||||||
noremap b cjkWordHandler.cursorWordStartLeft
|
nmap b cjkWordHandler.cursorWordStartLeft
|
||||||
|
|
||||||
" keep selection after indent (define in settings.json)
|
" keep selection after indent (define in settings.json)
|
||||||
" voremap < <gv
|
" voremap < <gv
|
||||||
|
|
@ -49,10 +51,13 @@ noremap gh editor.action.showDefinitionPreviewHover
|
||||||
|
|
||||||
noremap <leader><leader> workbench.action.quickOpen
|
noremap <leader><leader> workbench.action.quickOpen
|
||||||
noremap <leader>: workbench.action.showCommands
|
noremap <leader>: workbench.action.showCommands
|
||||||
|
noremap <leader>E workbench.view.explorer
|
||||||
|
|
||||||
" <leader>q : +quit
|
" <leader>q : +quit
|
||||||
noremap <leader>qq :quit<CR>
|
noremap <leader>qq :quit<CR>
|
||||||
noremap <leader>qQ :qall<CR>
|
noremap <leader>qQ :qall<CR>
|
||||||
noremap <leader>Q :quit<CR>
|
noremap <leader>Q :quit<CR>
|
||||||
|
|
||||||
" <leader>w : +write/window
|
" <leader>w : +write/window
|
||||||
noremap <leader>ww :write<CR>
|
noremap <leader>ww :write<CR>
|
||||||
noremap <leader>wa :wall<CR>
|
noremap <leader>wa :wall<CR>
|
||||||
|
|
@ -66,6 +71,7 @@ noremap <leader>we workbench.action.focusAboveGroup
|
||||||
noremap <leader>wE workbench.action.splitEditorUp
|
noremap <leader>wE workbench.action.splitEditorUp
|
||||||
noremap <leader>wi workbench.action.focusRightGroup
|
noremap <leader>wi workbench.action.focusRightGroup
|
||||||
noremap <leader>wI workbench.action.splitEditorRight
|
noremap <leader>wI workbench.action.splitEditorRight
|
||||||
|
|
||||||
" <leader>f : +find/file
|
" <leader>f : +find/file
|
||||||
noremap <leader>ff workbench.action.quickOpen
|
noremap <leader>ff workbench.action.quickOpen
|
||||||
noremap <leader>fF workbench.view.search
|
noremap <leader>fF workbench.view.search
|
||||||
|
|
@ -77,6 +83,7 @@ noremap <leader>fR workbench.action.openRecent
|
||||||
noremap <leader>fs workbench.action.search.toggleQueryDetails
|
noremap <leader>fs workbench.action.search.toggleQueryDetails
|
||||||
noremap <leader>ft workbench.action.terminal.toggleTerminal
|
noremap <leader>ft workbench.action.terminal.toggleTerminal
|
||||||
noremap <leader>fx workbench.view.extensions
|
noremap <leader>fx workbench.view.extensions
|
||||||
|
|
||||||
" <leader>p : +project (requires Project Manager extension)
|
" <leader>p : +project (requires Project Manager extension)
|
||||||
noremap <leader>pp projectManager.listProjects
|
noremap <leader>pp projectManager.listProjects
|
||||||
noremap <leader>pP projectManager.listAnyProjects#sideBarAny
|
noremap <leader>pP projectManager.listAnyProjects#sideBarAny
|
||||||
|
|
@ -87,12 +94,16 @@ noremap <leader>pF projectManager.filterProjectsByTag
|
||||||
noremap <leader>pg projectManager.listGitProjects#sideBarGit
|
noremap <leader>pg projectManager.listGitProjects#sideBarGit
|
||||||
noremap <leader>pr workbench.action.openRecent
|
noremap <leader>pr workbench.action.openRecent
|
||||||
noremap <leader>ps projectManager.saveProject
|
noremap <leader>ps projectManager.saveProject
|
||||||
|
|
||||||
" <leader>g : +git
|
" <leader>g : +git
|
||||||
noremap <leader>gg workbench.view.scm
|
noremap <leader>gg workbench.view.scm
|
||||||
noremap <leader>gS git.stageAll
|
noremap <leader>gS git.stageAll
|
||||||
|
|
||||||
" <leader>j : +jump
|
" <leader>j : +jump
|
||||||
noremap <leader>jj workbench.action.gotoLine
|
noremap <leader>jj workbench.action.gotoLine
|
||||||
|
|
||||||
" <leader>l : +language (define in settings.json)
|
" <leader>l : +language (define in settings.json)
|
||||||
|
|
||||||
" <leader>u : +ui
|
" <leader>u : +ui
|
||||||
noremap <leader>ui workbench.action.selectTheme
|
noremap <leader>ui workbench.action.selectTheme
|
||||||
noremap <leader>uw editor.action.toggleWordWrap
|
noremap <leader>uw editor.action.toggleWordWrap
|
||||||
|
|
@ -117,14 +128,18 @@ noremap <leader>tC testing.debugCurrentTest
|
||||||
noremap <leader>tx testing.cancelTestRun
|
noremap <leader>tx testing.cancelTestRun
|
||||||
" <leader>d : +debug
|
" <leader>d : +debug
|
||||||
" <leader>h : +help
|
" <leader>h : +help
|
||||||
|
|
||||||
" <leader>c : +code
|
" <leader>c : +code
|
||||||
noremap <leader>cr coderunner.run
|
noremap <leader>cr coderunner.run
|
||||||
noremap <leader>cf editor.action.formatDocument
|
noremap <leader>cf editor.action.formatDocument
|
||||||
noremap <leader>c<leader> editor.action.trimTrailingWhitespace
|
noremap <leader>c<leader> editor.action.trimTrailingWhitespace
|
||||||
noremap <leader>cs workbench.action.gotoSymbol
|
noremap <leader>cs workbench.action.gotoSymbol
|
||||||
noremap <leader>cS workbench.action.showAllSymbols
|
noremap <leader>cS workbench.action.showAllSymbols
|
||||||
|
|
||||||
" <leader>b : +buffer
|
" <leader>b : +buffer
|
||||||
noremap <leader>bb workbench.action.showAllEditors
|
noremap <leader>bb workbench.action.showAllEditors
|
||||||
noremap <leader>bd :bdelete<CR>
|
noremap <leader>bd :bdelete<CR>
|
||||||
noremap <leader>bh :bprevious<CR>
|
noremap <leader>bh :bprevious<CR>
|
||||||
noremap <leader>bi :bnext<CR>
|
noremap <leader>bi :bnext<CR>
|
||||||
|
|
||||||
|
" 中文分词测试用例
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue