mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
chezmoi: windows migration dir
This commit is contained in:
parent
52b70819bf
commit
c24adf35d4
51 changed files with 3403 additions and 3840 deletions
89
misc/KMonad/linux.kbd
Normal file
89
misc/KMonad/linux.kbd
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
;; Linux kmonad.kbd
|
||||
|
||||
(defcfg
|
||||
;; The device file to read input from, under /dev/input/by-id
|
||||
;; Can be obtained by running `sudo evtest` and selecting the device
|
||||
input (device-file "/dev/input/by-id/usb-Razer_Razer_BlackWidow_V3_Mini-event-kbd")
|
||||
;; The device file to write output to, under /dev/uinput
|
||||
output (uinput-sink "KMonad")
|
||||
;; fallthrough - boolean{false}, allows user to only specify certain parts of a layout
|
||||
;; Others remain unchanged
|
||||
fallthrough true
|
||||
;; allow-cmd - boolean{false}, allowing to run shell commands
|
||||
allow-cmd true
|
||||
;; cmp-seq - key{RightAlt}, So called `AltGr` key
|
||||
cmp-seq ralt
|
||||
;; cmp-seq-delay - NN{0} - delay between each pressed key in a compose-key sequence
|
||||
cmp-seq-delay 0
|
||||
;; ;; key-seq-delay - NN{5} - delay between each outputted key event
|
||||
;; key-seq-delay 5
|
||||
;; implicit-around - {around} - Not sure what this does
|
||||
implicit-around around
|
||||
)
|
||||
|
||||
;; Razer BlackWidow V3 Mini - 65% ANSI layout
|
||||
;; This layer is a reference default layer, won't be used directly
|
||||
;; The first `deflayer' below will be the default layer
|
||||
;; (defsrc
|
||||
;; esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
;; tab q w e r t y u i o p [ ] \ pgup
|
||||
;; caps a s d f g h j k l ; ' ret pgdn
|
||||
;; lsft z x c v b n m , . / rsft up ins
|
||||
;; lctl lmet lalt spc ralt rctl left down right
|
||||
;; )
|
||||
|
||||
(defsrc
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = \ del
|
||||
tab q w f p g j l u y ; [ ] bspc pgup
|
||||
caps a r s t d h n e i o ' ret pgdn
|
||||
lsft z x c v b k m , . / rsft up ins
|
||||
lctl lmet lalt spc ralt rctl left down right
|
||||
)
|
||||
|
||||
;; (deflayer name
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _
|
||||
;; )
|
||||
|
||||
;; CapsLock -> Esc when tapped, Ctrl when held
|
||||
(defalias mo1 (tap-next-release esc lctl))
|
||||
(defalias spctl (tap-next-release spc (layer-toggle spcl)))
|
||||
|
||||
|
||||
;; Colemak
|
||||
(deflayer colemak
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = \ del
|
||||
tab q w f p g j l u y ; [ ] bspc pgup
|
||||
@mo1 a r s t d h n e i o ' ret pgdn
|
||||
lsft z x c v b k m , . / rsft up ins
|
||||
lctl lmet lalt @spctl ralt rctl left down right
|
||||
)
|
||||
|
||||
(deflayer qwerty
|
||||
esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
tab q w e r t y u i o p [ ] \ pgup
|
||||
@mo1 a s d f g h j k l ; ' ret pgdn
|
||||
lsft z x c v b n m , . / rsft up ins
|
||||
lctl lmet lalt @spctl ralt rctl left down right
|
||||
)
|
||||
|
||||
|
||||
;; SPACE Layer
|
||||
(deflayer spcl
|
||||
grv f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 \ del
|
||||
tab q w f p g j l u y ; pgup pgdn bspc pgup
|
||||
@mo1 a r s t d left down up right end ' ret pgdn
|
||||
lsft z x c v b home m , . / rsft up ins
|
||||
lctl lmet lalt spc ralt rctl left down right
|
||||
)
|
||||
|
||||
;; (deflayer spcl
|
||||
;; esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
;; tab q w e r t y u i o p [ ] \ pgup
|
||||
;; @mo1 a s d f g left down up right ; ' ret pgdn
|
||||
;; lsft z x c v b n m , . / rsft up ins
|
||||
;; lctl lmet lalt spc ralt rctl left down right
|
||||
;; )
|
||||
77
misc/KMonad/windows.kbd
Normal file
77
misc/KMonad/windows.kbd
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
;; Windows kmonad.kbd
|
||||
;; Detailed comments can be found at ./linux.kbd
|
||||
|
||||
(defcfg
|
||||
input (low-level-hook)
|
||||
output (send-event-sink)
|
||||
fallthrough true
|
||||
allow-cmd true
|
||||
cmp-seq ralt
|
||||
cmp-seq-delay 0
|
||||
implicit-around around
|
||||
)
|
||||
|
||||
;; Razer BlackWidow V3 Mini - 65% ANSI layout
|
||||
;; (defsrc
|
||||
;; esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
;; tab q w e r t y u i o p [ ] \ pgup
|
||||
;; caps a s d f g h j k l ; ' ret pgdn
|
||||
;; lsft z x c v b n m , . / rsft up ins
|
||||
;; lctl lmet lalt spc ralt rctl left down right
|
||||
;; )
|
||||
|
||||
(defsrc
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = \ del
|
||||
tab q w f p g j l u y ; [ ] bspc pgup
|
||||
caps a r s t d h n e i o ' ret pgdn
|
||||
lsft z x c v b k m , . / rsft up ins
|
||||
lctl lmet lalt spc ralt rctl left down right
|
||||
)
|
||||
|
||||
;; (deflayer name
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
;; _ _ _ _ _ _ _ _ _
|
||||
;; )
|
||||
|
||||
;; CapsLock -> Esc when tapped, Ctrl when held
|
||||
(defalias mo1 (tap-next-release esc lctl))
|
||||
(defalias spctl (tap-next-release spc (layer-toggle spcl)))
|
||||
|
||||
|
||||
;; Colemak
|
||||
(deflayer colemak
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = \ del
|
||||
tab q w f p g j l u y ; [ ] bspc pgup
|
||||
@mo1 a r s t d h n e i o ' ret pgdn
|
||||
lsft z x c v b k m , . / rsft up ins
|
||||
lctl lmet lalt @spctl ralt rctl left down right
|
||||
)
|
||||
|
||||
(deflayer qwerty
|
||||
esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
tab q w e r t y u i o p [ ] \ pgup
|
||||
@mo1 a s d f g h j k l ; ' ret pgdn
|
||||
lsft z x c v b n m , . / rsft up ins
|
||||
lctl lmet lalt @spctl ralt rctl left down right
|
||||
)
|
||||
|
||||
|
||||
;; SPACE Layer
|
||||
(deflayer spcl
|
||||
grv f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 \ del
|
||||
tab q w f p g j l u y ; pgup pgdn bspc pgup
|
||||
@mo1 a r s t d left down up right end ' ret pgdn
|
||||
lsft z x c v b home m , . / rsft up ins
|
||||
lctl lmet lalt spc ralt rctl left down right
|
||||
)
|
||||
|
||||
;; (deflayer spcl
|
||||
;; esc 1 2 3 4 5 6 7 8 9 0 - = bspc del
|
||||
;; tab q w e r t y u i o p [ ] \ pgup
|
||||
;; @mo1 a s d f g left down up right ; ' ret pgdn
|
||||
;; lsft z x c v b n m , . / rsft up ins
|
||||
;; lctl lmet lalt spc ralt rctl left down right
|
||||
;; )
|
||||
115
misc/autohotkey/Caps.ahk
Normal file
115
misc/autohotkey/Caps.ahk
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
; 全局变量声明
|
||||
global g_LastCtrlKeyDownTime := 0
|
||||
global g_AbortSendEsc := false
|
||||
global g_ControlRepeatDetected := false
|
||||
|
||||
*CapsLock:: {
|
||||
global g_ControlRepeatDetected
|
||||
global g_LastCtrlKeyDownTime
|
||||
global g_AbortSendEsc
|
||||
|
||||
if (g_ControlRepeatDetected) {
|
||||
return
|
||||
}
|
||||
|
||||
Send "{Ctrl down}"
|
||||
g_LastCtrlKeyDownTime := A_TickCount
|
||||
g_AbortSendEsc := false
|
||||
g_ControlRepeatDetected := true
|
||||
}
|
||||
|
||||
*CapsLock Up:: {
|
||||
global g_ControlRepeatDetected
|
||||
global g_LastCtrlKeyDownTime
|
||||
global g_AbortSendEsc
|
||||
|
||||
Send "{Ctrl up}"
|
||||
g_ControlRepeatDetected := false
|
||||
if (g_AbortSendEsc) {
|
||||
return
|
||||
}
|
||||
current_time := A_TickCount
|
||||
time_elapsed := current_time - g_LastCtrlKeyDownTime
|
||||
if (time_elapsed <= 250) {
|
||||
SendInput "{Esc}"
|
||||
}
|
||||
}
|
||||
|
||||
; 组合所有 Ctrl 快捷键
|
||||
#HotIf
|
||||
~*^a::
|
||||
~*^b::
|
||||
~*^c::
|
||||
~*^d::
|
||||
~*^e::
|
||||
~*^f::
|
||||
~*^g::
|
||||
~*^h::
|
||||
~*^i::
|
||||
~*^j::
|
||||
~*^k::
|
||||
~*^l::
|
||||
~*^m::
|
||||
~*^n::
|
||||
~*^o::
|
||||
~*^p::
|
||||
~*^q::
|
||||
~*^r::
|
||||
~*^s::
|
||||
~*^t::
|
||||
~*^u::
|
||||
~*^v::
|
||||
~*^w::
|
||||
~*^x::
|
||||
~*^y::
|
||||
~*^z::
|
||||
~*^1::
|
||||
~*^2::
|
||||
~*^3::
|
||||
~*^4::
|
||||
~*^5::
|
||||
~*^6::
|
||||
~*^7::
|
||||
~*^8::
|
||||
~*^9::
|
||||
~*^0::
|
||||
~*^Space::
|
||||
~*^Backspace::
|
||||
~*^Delete::
|
||||
~*^Insert::
|
||||
~*^Home::
|
||||
~*^End::
|
||||
~*^PgUp::
|
||||
~*^PgDn::
|
||||
~*^Tab::
|
||||
~*^Enter::
|
||||
~*^,::
|
||||
~*^.::
|
||||
~*^/::
|
||||
~*^;::
|
||||
~*^'::
|
||||
~*^[::
|
||||
~*^]::
|
||||
~*^\::
|
||||
~*^-::
|
||||
~*^=::
|
||||
~*^`::
|
||||
~*^F1::
|
||||
~*^F2::
|
||||
~*^F3::
|
||||
~*^F4::
|
||||
~*^F5::
|
||||
~*^F6::
|
||||
~*^F7::
|
||||
~*^F8::
|
||||
~*^F9::
|
||||
~*^F10::
|
||||
~*^F11::
|
||||
~*^F12::
|
||||
{
|
||||
global g_AbortSendEsc
|
||||
g_AbortSendEsc := true
|
||||
}
|
||||
43
misc/autohotkey/Tab.ahk
Normal file
43
misc/autohotkey/Tab.ahk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
Tab Up:: Send '{Tab ' (A_PriorKey = 'Tab' ? 1 : times) '}'
|
||||
Tab:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Tab', 'P')
|
||||
h::Left
|
||||
n::Down
|
||||
e::Up
|
||||
i::Right
|
||||
H::Home
|
||||
I::End
|
||||
u::PgUp
|
||||
d::PgDn
|
||||
1::F1
|
||||
2::F2
|
||||
3::F3
|
||||
4::F4
|
||||
5::F5
|
||||
6::F6
|
||||
7::F7
|
||||
8::F8
|
||||
9::F9
|
||||
0::F10
|
||||
-::F11
|
||||
=::F12
|
||||
+:: global times .= ThisHotkey
|
||||
#HotIf
|
||||
|
||||
Enter Up:: Send '{Enter ' (A_PriorKey = 'Enter' ? 1 : times) '}'
|
||||
Enter:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Enter', 'P')
|
||||
b:: {
|
||||
Run("vivaldi.exe")
|
||||
}
|
||||
t:: {
|
||||
Run("wezterm-gui.exe")
|
||||
}
|
||||
c:: {
|
||||
Run("code.exe")
|
||||
}
|
||||
BIN
misc/autohotkey/bin/Caps.exe
Normal file
BIN
misc/autohotkey/bin/Caps.exe
Normal file
Binary file not shown.
BIN
misc/autohotkey/bin/colemak.exe
Normal file
BIN
misc/autohotkey/bin/colemak.exe
Normal file
Binary file not shown.
29
misc/autohotkey/colemak.ahk
Normal file
29
misc/autohotkey/colemak.ahk
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
|
||||
q::q
|
||||
w::w
|
||||
e::f
|
||||
r::p
|
||||
t::g
|
||||
y::j
|
||||
u::l
|
||||
i::u
|
||||
o::y
|
||||
p::;
|
||||
a::a
|
||||
s::r
|
||||
d::s
|
||||
f::t
|
||||
g::d
|
||||
h::h
|
||||
j::n
|
||||
k::e
|
||||
l::i
|
||||
`;::o
|
||||
z::z
|
||||
x::x
|
||||
c::c
|
||||
v::v
|
||||
b::b
|
||||
n::k
|
||||
m::m
|
||||
142
misc/autohotkey/main.ahk
Normal file
142
misc/autohotkey/main.ahk
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
|
||||
#h::
|
||||
{
|
||||
Send("{Left}")
|
||||
}
|
||||
|
||||
#n::
|
||||
{
|
||||
Send("{Down}")
|
||||
}
|
||||
|
||||
#e::
|
||||
{
|
||||
Send("{Up}")
|
||||
}
|
||||
|
||||
#i::
|
||||
{
|
||||
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
|
||||
43
misc/autohotkey/spcl.ahk
Normal file
43
misc/autohotkey/spcl.ahk
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#Requires AutoHotkey v2.0
|
||||
#SingleInstance Force
|
||||
|
||||
Space Up:: Send '{Space ' (A_PriorKey = 'Space' ? 1 : times) '}'
|
||||
Space:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Space', 'P')
|
||||
h::Left
|
||||
n::Down
|
||||
e::Up
|
||||
i::Right
|
||||
k::Home
|
||||
o::End
|
||||
u::PgUp
|
||||
m::PgDn
|
||||
1::F1
|
||||
2::F2
|
||||
3::F3
|
||||
4::F4
|
||||
5::F5
|
||||
6::F6
|
||||
7::F7
|
||||
8::F8
|
||||
9::F9
|
||||
0::F10
|
||||
-::F11
|
||||
=::F12
|
||||
+:: global times .= ThisHotkey
|
||||
#HotIf
|
||||
|
||||
Enter Up:: Send '{Enter ' (A_PriorKey = 'Enter' ? 1 : times) '}'
|
||||
Enter:: global times := ''
|
||||
|
||||
#HotIf GetKeyState('Enter', 'P')
|
||||
b:: {
|
||||
Run("vivaldi.exe")
|
||||
}
|
||||
t:: {
|
||||
Run("wezterm-gui.exe")
|
||||
}
|
||||
c:: {
|
||||
Run("code.exe")
|
||||
}
|
||||
1040
misc/browser/surfingkeys.js
Normal file
1040
misc/browser/surfingkeys.js
Normal file
File diff suppressed because it is too large
Load diff
9
misc/mac/etc/pam.d/sudo
Normal file
9
misc/mac/etc/pam.d/sudo
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# sudo: auth account password session
|
||||
# Add this line `pam_tid.so` to enable Touch ID for sudo
|
||||
auth sufficient pam_tid.so
|
||||
auth include sudo_local
|
||||
auth sufficient pam_smartcard.so
|
||||
auth required pam_opendirectory.so
|
||||
account required pam_permit.so
|
||||
password required pam_deny.so
|
||||
session required pam_permit.so
|
||||
105
misc/qmk/keychron_k3_pro.c
Normal file
105
misc/qmk/keychron_k3_pro.c
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/* Copyright 2023 @ Keychron (https://www.keychron.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define KC_ESC_CTRL MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_HYP MT(MOD_HYPR, KC_NO)
|
||||
#define KC_TAB_L LT(CMK_TABL, KC_TAB)
|
||||
|
||||
// clang-format off
|
||||
enum layers{
|
||||
CMK_WIN, // Colemak Windows & GNU/Linux Base Layer (caps = esc/ctrl, swap bksp and backslash) (Switch to the left)
|
||||
CMK_FNL, // Shared Functional Layer for both QWERTY and Colemak
|
||||
/*
|
||||
FN+C => CMK_WIN // Colemak Windows & GNU/Linux Base Layer
|
||||
FN+M => QWE_MMM // QWERTY Modified Layer for macOS
|
||||
FN+Q => QWE_DEF // QWERTY Default Layer
|
||||
FN+X => CMK_MAC // Colemak Mac Layer
|
||||
FN+W => QWE_MAC // QWERTY Mac Layer
|
||||
*/
|
||||
QWE_MMM, // QWERTY Modified Layer for macOS, designed for macOS Built-in Layout (Switch to the right)
|
||||
QWE_DEF, // QWERTY Modified Layer for Windows & GNU/Linux, designed for GNU/Linux xkb colemak variant layout
|
||||
CMK_MAC, // Colemak Mac Layer (swap CMD and CTRL at corner, caps = esc/ctrl, swap bksp and backslash, triggered by FN+M)
|
||||
QWE_MAC, // QWERTY Mac Layer (Default Macintosh Layout)
|
||||
CMK_TABL, // Colemak Tab Layer
|
||||
CMK_SPCL // Colemak Space Layer
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[CMK_WIN] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
KC_TAB_L, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_ESC_CTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(CMK_FNL),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[CMK_FNL] = LAYOUT_ansi_84(
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, RGB_TOG,
|
||||
KC_TRNS, BT_HST1, BT_HST2, BT_HST3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
RGB_TOG, TO(QWE_DEF), RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, TO(CMK_MAC), TO(CMK_WIN), KC_TRNS, BAT_LVL, NK_TOGG, TO(QWE_MMM), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
[QWE_MMM] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_ESC_CTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(CMK_FNL),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
// Swap GUI and CTRL
|
||||
|
||||
[QWE_DEF] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(CMK_FNL),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[CMK_MAC] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
KC_TAB_L, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_ESC_CTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(CMK_FNL),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[QWE_MAC] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNAP, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD,MO(CMK_FNL),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
[CMK_TABL] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_END, KC_5, KC_HOME, KC_7, KC_8, KC_9, KC_HOME, KC_MINS, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_PGUP, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_ESC_CTRL, KC_A, KC_R, KC_S, KC_T, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_O, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_HYP,KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
[CMK_SPCL] = LAYOUT_ansi_84(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, RGB_MOD,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_END, KC_5, KC_HOME, KC_7, KC_8, KC_9, KC_HOME, KC_MINS, KC_EQL, KC_BSLS, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_PGUP, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN,
|
||||
KC_ESC_CTRL, KC_A, KC_R, KC_S, KC_T, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_O, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_HYP,KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
};
|
||||
12
misc/thunderbird/tbkeys.json
Normal file
12
misc/thunderbird/tbkeys.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"n": "cmd:cmd_nextMsg",
|
||||
"e": "cmd:cmd_previousMsg",
|
||||
"o": "cmd:cmd_openMessage",
|
||||
"f": "cmd:cmd_forward",
|
||||
"#": "cmd:cmd_delete",
|
||||
"r": "cmd:cmd_reply",
|
||||
"a": "cmd:cmd_replyall",
|
||||
"x": "cmd:cmd_archive",
|
||||
"c": "func:MsgNewMessage",
|
||||
"u": "tbkeys:closeMessageAndRefresh"
|
||||
}
|
||||
9547
misc/vscode/extensions/vspacecode.jsonc
Normal file
9547
misc/vscode/extensions/vspacecode.jsonc
Normal file
File diff suppressed because it is too large
Load diff
1038
misc/vscode/hsnips/latex.hsnips
Normal file
1038
misc/vscode/hsnips/latex.hsnips
Normal file
File diff suppressed because it is too large
Load diff
1009
misc/vscode/hsnips/markdown.hsnips
Normal file
1009
misc/vscode/hsnips/markdown.hsnips
Normal file
File diff suppressed because it is too large
Load diff
133
misc/vscode/hsnips/typst.hsnips
Normal file
133
misc/vscode/hsnips/typst.hsnips
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
snippet mk "inline Math" iwA
|
||||
$${1}$
|
||||
endsnippet
|
||||
|
||||
snippet dmi "display Math" iwA
|
||||
$ ${1} $
|
||||
endsnippet
|
||||
|
||||
snippet dmm "display Math" iwA
|
||||
$
|
||||
${1}
|
||||
$
|
||||
endsnippet
|
||||
|
||||
snippet pp "parenthesis" iAm
|
||||
(${1})
|
||||
endsnippet
|
||||
|
||||
snippet lim "limit" iAm
|
||||
lim_(${1:n} -> ${2:oo})
|
||||
endsnippet
|
||||
|
||||
snippet derive "derive" iAm
|
||||
derive(${1:f}, ${2:x})
|
||||
endsnippet
|
||||
|
||||
snippet part "partial" iAm
|
||||
(diff ${1:f})/(diff ${3:x})
|
||||
endsnippet
|
||||
|
||||
snippet sb "subscript" iAm
|
||||
_(${1:2})
|
||||
endsnippet
|
||||
|
||||
snippet sr "square" iAm
|
||||
^2
|
||||
endsnippet
|
||||
|
||||
snippet pow "to the ... power" iAm
|
||||
^(${1:3})
|
||||
endsnippet
|
||||
|
||||
snippet veps "epsilon.alt" iAm
|
||||
epsilon.alt
|
||||
endsnippet
|
||||
|
||||
snippet ;; "\;" iAm
|
||||
\;
|
||||
endsnippet
|
||||
|
||||
snippet ,, "\," iAm
|
||||
\,
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])(\d)` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2]``
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm
|
||||
`` rv = m[1] + "_(" + m[2] + ")" ``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<![A-Za-z])([A-Za-hk-z])([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2] ``
|
||||
endsnippet
|
||||
|
||||
# Custom: Add more greek letters
|
||||
|
||||
snippet `(\)|mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript for greek letter" iAm
|
||||
`` rv = m[1] + "_" + m[2].substring(0, 1) ``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<![A-Za-z])([A-Za-hk-z01])(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||
``
|
||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
||||
``
|
||||
endsnippet
|
||||
|
||||
snippet `(mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||
``
|
||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
||||
``
|
||||
endsnippet
|
||||
|
||||
snippet `((grave|acute|hat|tilde|macron|breve|dot|dot\.double|dot\.triple|dot\.quad|diaer|circle|acute\.double|caron|arrow|arrow\.l|upright|italic|bold|sans|frak|mono|bb|cal)\([a-zA-Z\d]+\))(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||
``
|
||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||
rv = (map[m[3]] || m[3]) + "(" + m[1] + ")"
|
||||
``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<!\.)alt` "alt" iAm
|
||||
.alt
|
||||
endsnippet
|
||||
|
||||
snippet invs "inverse" iAm
|
||||
^(-1)
|
||||
endsnippet
|
||||
|
||||
snippet xl "vector" iAm
|
||||
arrow(${1:x})
|
||||
endsnippet
|
||||
|
||||
snippet @< "angle" iAm
|
||||
angle.l ${1:x} angle.r
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet HL "highlight" iA
|
||||
#highlight[${VISUAL}]
|
||||
endsnippet
|
||||
|
||||
snippet iiint "triple integral" iAm
|
||||
integral.triple ${1}
|
||||
endsnippet
|
||||
|
||||
snippet oint "closed line integral" iAm
|
||||
integral.cont ${1}
|
||||
endsnippet
|
||||
|
||||
snippet iint "double integral" iAm
|
||||
integral.double ${1}
|
||||
endsnippet
|
||||
|
||||
snippet int "integral" iAm
|
||||
integral ${1}
|
||||
endsnippet
|
||||
|
||||
snippet // "frac" iAm
|
||||
frac(${1:1}, ${2:2})
|
||||
endsnippet
|
||||
726
misc/vscode/keybindings-macos.jsonc
Normal file
726
misc/vscode/keybindings-macos.jsonc
Normal file
|
|
@ -0,0 +1,726 @@
|
|||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
// #region mac minor change for cross-platform compatiblity
|
||||
{
|
||||
"key": "cmd+r",
|
||||
"command": "workbench.action.openRecent"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+r",
|
||||
"command": "-workbench.action.openRecent"
|
||||
},
|
||||
{
|
||||
"key": "cmd+k cmd+o",
|
||||
"command": "workbench.action.files.openFileFolder",
|
||||
"when": "isMacNative && openFolderWorkspaceSupport"
|
||||
},
|
||||
// #endregion
|
||||
// #region quickOpen (Telescope)
|
||||
{
|
||||
"key": "cmd+p",
|
||||
"command": "workbench.action.quickOpen"
|
||||
},
|
||||
{
|
||||
"key": "cmd+p",
|
||||
"command": "workbench.action.quickOpenNavigatePrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "cmd+n",
|
||||
"command": "workbench.action.quickOpenNavigateNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "cmd+[",
|
||||
"command": "workbench.action.closeQuickOpen",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+[",
|
||||
"command": "workbench.action.closeQuickOpen",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{ // Emacs-like
|
||||
"key": "ctrl+g",
|
||||
"command": "workbench.action.closeQuickOpen",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{ // Emacs-like: M-x to show command palette
|
||||
"key": "alt+x",
|
||||
"command": "workbench.action.showCommands"
|
||||
},
|
||||
// #endregion
|
||||
// #region Extension: Code Runner
|
||||
{
|
||||
"key": "ctrl+alt+n",
|
||||
"command": "-code-runner.run"
|
||||
},
|
||||
// #endregion
|
||||
// #region Nvim-Tree like File Explorer
|
||||
// n, e : move cursor up/down
|
||||
// h : move cursor to parent folder
|
||||
// i : open file or folder
|
||||
{
|
||||
"key": "e",
|
||||
"command": "list.focusUp",
|
||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-list.focusUp",
|
||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "list.focusUp",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-list.focusUp",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "f",
|
||||
"command": "filesExplorer.findInWorkspace",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "n",
|
||||
"command": "list.focusDown",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "j",
|
||||
"command": "-list.focusDown",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "list.select",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "l",
|
||||
"command": "-list.select",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{ // z: Close all folders
|
||||
"key": "z",
|
||||
"command": "workbench.files.action.collapseExplorerFolders",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // <leader>e: Close left sidebar if is in file explorer
|
||||
"key": "space e",
|
||||
"command": "workbench.action.toggleSidebarVisibility",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && filesExplorerFocus"
|
||||
},
|
||||
{ // <leader>e: Focus on file explorer if is on sidebar and not in file explorer
|
||||
"key": "space e",
|
||||
"command": "workbench.files.action.focusFilesExplorer",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !filesExplorerFocus"
|
||||
},
|
||||
{ // <leader>g: Focus on file explorer if is on sidebar and not in file explorer
|
||||
"key": "space g",
|
||||
"command": "workbench.scm.focus",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !scmViewletVisible"
|
||||
},
|
||||
{ // a: add
|
||||
"key": "a",
|
||||
"command": "explorer.newFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // p: paste
|
||||
"key": "p",
|
||||
"command": "filesExplorer.paste",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // x: cut
|
||||
"key": "x",
|
||||
"command": "filesExplorer.cut",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // d: delete
|
||||
"key": "d",
|
||||
"command": "deleteFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // r: rename
|
||||
"key": "r",
|
||||
"command": "renameFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // s: open in vertical split / to side
|
||||
"key": "s",
|
||||
"command": "explorer.openToSide",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // A: add folder
|
||||
"key": "shift+a",
|
||||
"command": "explorer.newFolder",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // C: Copy path
|
||||
"key": "shift+c",
|
||||
"command": "copyFilePath",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // E: Open in File Explorer
|
||||
"key": "shift+e",
|
||||
"command": "revealFileInOS",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // E: Open in File Explorer (WSL)
|
||||
"key": "shift+e",
|
||||
"command": "remote-wsl.revealInExplorer",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus && remoteName == 'wsl'"
|
||||
},
|
||||
{ // O: Open with System App
|
||||
"key": "shift+o",
|
||||
"command": "openInExternalApp.open",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // Y: Copy Relative Path
|
||||
"key": "shift+y",
|
||||
"command": "copyRelativeFilePath",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // R: Copy Relative Path
|
||||
"key": "shift+r",
|
||||
"command": "workbench.files.action.refreshFilesExplorer",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // T: Open in terminal
|
||||
"key": "shift+t",
|
||||
"command": "openInIntegratedTerminal",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Vim-like Hover Browsing
|
||||
{
|
||||
"key": "h",
|
||||
"command": "editor.action.scrollLeftHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "n",
|
||||
"command": "editor.action.scrollDownHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "editor.action.scrollUpHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "editor.action.scrollRightHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
// #endregion
|
||||
// #region Comment and semicolons
|
||||
{
|
||||
"key": "cmd+;",
|
||||
"command": "extension.insertSemicolon",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "cmd+/",
|
||||
"command": "-extension.insertSemicolon",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Vim-like Jupyter Navigation
|
||||
{
|
||||
"key": "n",
|
||||
"command": "notebook.focusNextEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||
},
|
||||
{
|
||||
"key": "j",
|
||||
"command": "-notebook.focusNextEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "notebook.focusPreviousEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-notebook.focusPreviousEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||
},
|
||||
// #endregion
|
||||
// #region Editor: Completions
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "workbench.action.files.newUntitledFile",
|
||||
"when": "!suggestWidgetVisible && !inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "-workbench.action.files.newUntitledFile"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "acceptSelectedSuggestion",
|
||||
"when": "suggestWidgetVisible && textInputFocus && !inlineSuggestionVisible"
|
||||
},
|
||||
{
|
||||
"key": "alt+f",
|
||||
"command": "editor.action.inlineSuggest.commit",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "editor.action.inlineSuggest.acceptNextWord",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b",
|
||||
"command": "hideSuggestWidget",
|
||||
"when": "suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b",
|
||||
"command": "editor.action.inlineSuggest.hide",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Terminal: tmux-like terminal control
|
||||
{
|
||||
"key": "cmd+0",
|
||||
"command": "workbench.action.focusLastEditorGroup",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + x : kill terminal
|
||||
"key": "ctrl+a x",
|
||||
"command": "workbench.action.terminal.kill",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + c : create new terminal
|
||||
"key": "ctrl+a c",
|
||||
"command": "workbench.action.terminal.new",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + | : split terminal vertically
|
||||
"key": "ctrl+a shift+\\",
|
||||
"command": "workbench.action.terminal.split",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + \ : split terminal vertically
|
||||
"key": "ctrl+a \\",
|
||||
"command": "workbench.action.terminal.split",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + / : search
|
||||
"key": "ctrl+a /",
|
||||
"command": "workbench.action.terminal.focusFind",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + t : toggle terminal
|
||||
"key": "ctrl+a t",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + ^a: show information
|
||||
"key": "ctrl+a ctrl+a",
|
||||
"command": "workbench.action.terminal.focusHover",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+i",
|
||||
"command": "-workbench.action.terminal.focusHover",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 1 : focus terminal 1
|
||||
"key": "ctrl+a 1",
|
||||
"command": "workbench.action.terminal.focusAtIndex1",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 2 : focus terminal 2
|
||||
"key": "ctrl+a 2",
|
||||
"command": "workbench.action.terminal.focusAtIndex2",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 3 : focus terminal 3
|
||||
"key": "ctrl+a 3",
|
||||
"command": "workbench.action.terminal.focusAtIndex3",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + g : Go to recent directory
|
||||
"key": "ctrl+a g",
|
||||
"command": "workbench.action.terminal.goToRecentDirectory",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+g",
|
||||
"command": "-workbench.action.terminal.goToRecentDirectory",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{ // prefix + d : detach terminal
|
||||
"key": "ctrl+a d",
|
||||
"command": "workbench.action.terminal.detachSession",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{ // prefix + a : attach to session
|
||||
"key": "ctrl+a a",
|
||||
"command": "workbench.action.terminal.attachToSession",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a h",
|
||||
"command": "workbench.action.terminal.focusPreviousPane",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a i",
|
||||
"command": "workbench.action.terminal.focusNextPane",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+H",
|
||||
"command": "workbench.action.terminal.resizePaneLeft",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+N",
|
||||
"command": "workbench.action.terminal.resizePaneDown",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+E",
|
||||
"command": "workbench.action.terminal.resizePaneUp",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+I",
|
||||
"command": "workbench.action.terminal.resizePaneRight",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "cmd+`",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+`",
|
||||
"command": "-workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
// {
|
||||
// "key": "space",
|
||||
// "command": "vspacecode.space",
|
||||
// "when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
|
||||
// },
|
||||
// {
|
||||
// "key": "space",
|
||||
// "command": "vspacecode.space",
|
||||
// "when": "sideBarFocus && !inputFocus && !whichkeyActive"
|
||||
// },
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "extension.vim_tab",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"
|
||||
},
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "-extension.vim_tab",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
|
||||
},
|
||||
{
|
||||
"key": "x",
|
||||
"command": "magit.discard-at-point",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-magit.discard-at-point"
|
||||
},
|
||||
{
|
||||
"key": "-",
|
||||
"command": "magit.reverse-at-point",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "v",
|
||||
"command": "-magit.reverse-at-point"
|
||||
},
|
||||
{
|
||||
"key": "shift+-",
|
||||
"command": "magit.reverting",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "shift+v",
|
||||
"command": "-magit.reverting"
|
||||
},
|
||||
{
|
||||
"key": "shift+o",
|
||||
"command": "magit.resetting",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "shift+x",
|
||||
"command": "-magit.resetting"
|
||||
},
|
||||
{
|
||||
"key": "x",
|
||||
"command": "-magit.reset-mixed"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+u x",
|
||||
"command": "-magit.reset-hard"
|
||||
},
|
||||
{
|
||||
"key": "y",
|
||||
"command": "-magit.show-refs"
|
||||
},
|
||||
{
|
||||
"key": "y",
|
||||
"command": "vspacecode.showMagitRefMenu",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode == 'Normal'"
|
||||
},
|
||||
{
|
||||
"key": "g",
|
||||
"command": "-magit.refresh",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "g",
|
||||
"command": "vspacecode.showMagitRefreshMenu",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.quickOpenSelectNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.quickOpenSelectPrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "acceptSelectedSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "showNextParameterHint",
|
||||
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "showPrevParameterHint",
|
||||
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "selectNextCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "selectPrevCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "acceptSelectedCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "file-browser.stepOut",
|
||||
"when": "inFileBrowser"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "file-browser.stepIn",
|
||||
"when": "inFileBrowser"
|
||||
},
|
||||
{
|
||||
"key": "space",
|
||||
"command": "vspacecode.space",
|
||||
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "space",
|
||||
"command": "vspacecode.space",
|
||||
"when": "sideBarFocus && !inputFocus && !whichkeyActive"
|
||||
},
|
||||
// #endregion
|
||||
// #region Editor: multicursor
|
||||
{
|
||||
"key": "alt+e",
|
||||
"command": "editor.action.insertCursorAbove",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+up",
|
||||
"command": "-editor.action.insertCursorAbove",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+n",
|
||||
"command": "editor.action.insertCursorBelow",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+down",
|
||||
"command": "-editor.action.insertCursorBelow",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Emacs like Cursor Movements
|
||||
{ // macOS original C-a will move to BoL, VSCode cursorHome will move to BoL & first non-whitespace character
|
||||
"key": "ctrl+a",
|
||||
"command": "cursorHome",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
// no C-A and C-k C-a to select all, use S-a instead
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "cursorEnd",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+b",
|
||||
"command": "cursorWordStartLeft",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+f",
|
||||
"command": "cursorWordStartRight",
|
||||
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
|
||||
},
|
||||
// #endregion
|
||||
// #region Ctrl+W Remaps (Vim-like)
|
||||
{
|
||||
"key": "ctrl+w h",
|
||||
"command": "workbench.action.navigateLeft"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+h",
|
||||
"command": "workbench.action.toggleSidebarVisibility"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w i",
|
||||
"command": "workbench.action.navigateRight"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+i",
|
||||
"command": "workbench.action.toggleAuxiliaryBar"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w n",
|
||||
"command": "workbench.action.navigateDown"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+n",
|
||||
"command": "workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w e",
|
||||
"command": "workbench.action.navigateUp"
|
||||
},
|
||||
{ // original ^w
|
||||
"key": "ctrl+w ctrl+w",
|
||||
"command": "workbench.action.closeActiveEditor",
|
||||
"when": "editorFocus || inSettingsEditor || inKeybindings || inWelcome"
|
||||
},
|
||||
{ // :only
|
||||
"key": "ctrl+w o",
|
||||
"command": "runCommands",
|
||||
"args": {
|
||||
"commands": [
|
||||
"workbench.action.joinAllGroups",
|
||||
"workbench.action.maximizeEditorHideSidebar"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+w",
|
||||
"command": "workbench.action.closeGroup",
|
||||
"when": "activeEditorGroupEmpty && multipleEditorGroups"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w",
|
||||
"command": "-workbench.action.closeGroup",
|
||||
"when": "activeEditorGroupEmpty && multipleEditorGroups"
|
||||
},
|
||||
// #endregion
|
||||
// #region Extension: VSpaceCode
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "vspacecode.space"
|
||||
},
|
||||
// #endregion
|
||||
// #region Sidebar: Search View
|
||||
{ // Focus on search list, therefore can use n/e to move up/down
|
||||
"key": "escape",
|
||||
"command": "search.action.focusSearchList",
|
||||
"when": "searchViewletFocus && inputBoxFocus"
|
||||
},
|
||||
{ // Focus on main input box
|
||||
"key": "l",
|
||||
"command": "workbench.action.replaceInFiles",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "r",
|
||||
"command": "toggleSearchRegex",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "w",
|
||||
"command": "toggleSearchWholeWord",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "c",
|
||||
"command": "toggleSearchCaseSensitive",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "p",
|
||||
"command": "toggleSearchPreserveCase",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "search.action.focusFilesToInclude",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+e",
|
||||
"command": "search.action.focusFilesToExclude",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Miscs and todos
|
||||
// #endregion
|
||||
]
|
||||
920
misc/vscode/keybindings-windows-linux.jsonc
Normal file
920
misc/vscode/keybindings-windows-linux.jsonc
Normal file
|
|
@ -0,0 +1,920 @@
|
|||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
// #region Panel
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "workbench.action.quickOpen",
|
||||
"when": "!terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "workbench.action.quickOpenNavigatePrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "workbench.action.quickOpenNavigateNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+[",
|
||||
"command": "workbench.action.closeQuickOpen",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{ // Emacs-like
|
||||
"key": "ctrl+g",
|
||||
"command": "workbench.action.closeQuickOpen",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{ // Emacs-like: M-x to show command palette
|
||||
"key": "alt+x",
|
||||
"command": "workbench.action.showCommands"
|
||||
},
|
||||
// #endregion
|
||||
// #region Extension: Code Runner
|
||||
{
|
||||
"key": "ctrl+alt+n",
|
||||
"command": "-code-runner.run"
|
||||
},
|
||||
// #endregion
|
||||
// #region Comment and semicolons
|
||||
{
|
||||
"key": "ctrl+oem_1", // ctrl+;
|
||||
"command": "extension.insertSemicolon",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{ // change to toggle comment
|
||||
"key": "ctrl+oem_2", // ctrl+/;
|
||||
"command": "-extension.insertSemicolon",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+oem_1",
|
||||
"command": "extension.insertSemicolonWithNewLine",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+oem_2",
|
||||
"command": "-extension.insertSemicolonWithNewLine",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+oem_2",
|
||||
"command": "github.copilot.acceptCursorPanelSolution",
|
||||
"when": "github.copilot.activated && github.copilot.panelVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+oem_2",
|
||||
"command": "-github.copilot.acceptCursorPanelSolution",
|
||||
"when": "github.copilot.activated && github.copilot.panelVisible"
|
||||
},
|
||||
// #endregion
|
||||
// #region Nvim-Tree like File Explorer
|
||||
// n, e : move cursor up/down
|
||||
// h : move cursor to parent folder
|
||||
// i : open file or folder
|
||||
{
|
||||
"key": "e",
|
||||
"command": "list.focusUp",
|
||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-list.focusUp",
|
||||
"when": "notebookEditorFocused && !inputFocus && !notebookOutputInputFocused"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "list.focusUp",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-list.focusUp",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "f",
|
||||
"command": "filesExplorer.findInWorkspace",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "n",
|
||||
"command": "list.focusDown",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "j",
|
||||
"command": "-list.focusDown",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "list.select",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "l",
|
||||
"command": "-list.select",
|
||||
"when": "listFocus && !inputFocus"
|
||||
},
|
||||
{ // ctrl-w enter: open in vertical split / to side
|
||||
"key": "ctrl+w enter",
|
||||
"command": "explorer.openToSide",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // z: Close all folders
|
||||
"key": "z",
|
||||
"command": "workbench.files.action.collapseExplorerFolders",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // <leader>e: Close left sidebar if is in file explorer
|
||||
"key": "space e",
|
||||
"command": "workbench.action.toggleSidebarVisibility",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && filesExplorerFocus"
|
||||
},
|
||||
{ // <leader>e: Focus on file explorer if is on sidebar and not in file explorer
|
||||
"key": "space e",
|
||||
"command": "workbench.files.action.focusFilesExplorer",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !filesExplorerFocus"
|
||||
},
|
||||
{ // <leader>g: Focus on file explorer if is on sidebar and not in file explorer
|
||||
"key": "space g",
|
||||
"command": "workbench.scm.focus",
|
||||
"when": "sideBarFocus && !inputFocus && !searchViewletVisible && !scmViewletVisible"
|
||||
},
|
||||
{ // a: add
|
||||
"key": "a",
|
||||
"command": "explorer.newFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // p: paste
|
||||
"key": "p",
|
||||
"command": "filesExplorer.paste",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // x: cut
|
||||
"key": "x",
|
||||
"command": "filesExplorer.cut",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // d: delete
|
||||
"key": "d",
|
||||
"command": "deleteFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // r: rename
|
||||
"key": "r",
|
||||
"command": "renameFile",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // s: open in vertical split / to side
|
||||
"key": "s",
|
||||
"command": "explorer.openToSide",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // A: add folder
|
||||
"key": "shift+a",
|
||||
"command": "explorer.newFolder",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // C: Copy path
|
||||
"key": "shift+c",
|
||||
"command": "copyFilePath",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // E: Open in File Explorer
|
||||
"key": "shift+e",
|
||||
"command": "revealFileInOS",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // E: Open in File Explorer (WSL)
|
||||
"key": "shift+e",
|
||||
"command": "remote-wsl.revealInExplorer",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus && remoteName == 'wsl'"
|
||||
},
|
||||
{ // O: Open with System App
|
||||
"key": "shift+o",
|
||||
"command": "openInExternalApp.open",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // Y: Copy Relative Path
|
||||
"key": "shift+y",
|
||||
"command": "copyRelativeFilePath",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // R: Copy Relative Path
|
||||
"key": "shift+r",
|
||||
"command": "workbench.files.action.refreshFilesExplorer",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
{ // T: Open in terminal
|
||||
"key": "shift+t",
|
||||
"command": "openInIntegratedTerminal",
|
||||
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Vim-like Hover Browsing
|
||||
{
|
||||
"key": "h",
|
||||
"command": "editor.action.scrollLeftHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "n",
|
||||
"command": "editor.action.scrollDownHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "editor.action.scrollUpHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "editor.action.scrollRightHover",
|
||||
"when": "editorHoverFocused"
|
||||
},
|
||||
// #endregion
|
||||
// #region Vim-like Jupyter Navigation
|
||||
{
|
||||
"key": "n",
|
||||
"command": "notebook.focusNextEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||
},
|
||||
{
|
||||
"key": "j",
|
||||
"command": "-notebook.focusNextEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'none' && notebookEditorCursorAtBoundary != 'top'"
|
||||
},
|
||||
{
|
||||
"key": "e",
|
||||
"command": "notebook.focusPreviousEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-notebook.focusPreviousEditor",
|
||||
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
|
||||
},
|
||||
// #endregion
|
||||
// #region Git / Source Control
|
||||
// { // Alt+Enter: Send Commit when editing commit message
|
||||
// "key": "alt+enter",
|
||||
// "command": "git.commitMessageAccept",
|
||||
// "when": "editorLangId=\"git-commit\""
|
||||
// },
|
||||
{
|
||||
"key": "ctrl+shift+g c",
|
||||
"command": "-gitlens.showQuickCommitFileDetails",
|
||||
"when": "editorTextFocus && !gitlens:disabled && config.gitlens.keymap == 'chorded'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+g s",
|
||||
"command": "git.stageAll"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+g g",
|
||||
"command": "workbench.view.scm",
|
||||
"when": "workbench.scm.active"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+g",
|
||||
"command": "-workbench.view.scm",
|
||||
"when": "workbench.scm.active"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+shift+b",
|
||||
"command": "editor.action.goToSelectionAnchor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+shift+i",
|
||||
"command": "workbench.action.selectProductIconTheme"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l p",
|
||||
"command": "-extension.openPrGitProvider"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l g",
|
||||
"command": "-extension.openInGitHub"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l c",
|
||||
"command": "-extension.copyGitHubLinkToClipboard"
|
||||
},
|
||||
// #endregion
|
||||
// #region Use ^pbnf to navigate completions
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "workbench.action.files.newUntitledFile",
|
||||
"when": "!suggestWidgetVisible && !inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "-workbench.action.files.newUntitledFile"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "acceptSelectedSuggestion",
|
||||
"when": "suggestWidgetVisible && textInputFocus && !inlineSuggestionVisible"
|
||||
},
|
||||
{
|
||||
"key": "alt+f",
|
||||
"command": "editor.action.inlineSuggest.commit",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "editor.action.inlineSuggest.acceptNextWord",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b",
|
||||
"command": "hideSuggestWidget",
|
||||
"when": "suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b",
|
||||
"command": "editor.action.inlineSuggest.hide",
|
||||
"when": "inlineSuggestionVisible && textInputFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Terminal Control, use ^a as prefix / leader key
|
||||
// tmux-like terminal control
|
||||
{ // prefix + x : kill terminal
|
||||
"key": "ctrl+a space",
|
||||
"command": "vspacecode.space",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + x : kill terminal
|
||||
"key": "ctrl+a x",
|
||||
"command": "workbench.action.terminal.kill",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + c : create new terminal
|
||||
"key": "ctrl+a c",
|
||||
"command": "workbench.action.terminal.new",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + | : split terminal vertically
|
||||
"key": "ctrl+a shift+\\",
|
||||
"command": "workbench.action.terminal.split",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + \ : split terminal vertically
|
||||
"key": "ctrl+a \\",
|
||||
"command": "workbench.action.terminal.split",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + / : search
|
||||
"key": "ctrl+a /",
|
||||
"command": "workbench.action.terminal.focusFind",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + t : toggle terminal
|
||||
"key": "ctrl+a t",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{ // prefix + ^a: show information
|
||||
"key": "ctrl+a a",
|
||||
"command": "workbench.action.terminal.focusHover",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+i",
|
||||
"command": "-workbench.action.terminal.focusHover",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 1 : focus terminal 1
|
||||
"key": "ctrl+a 1",
|
||||
"command": "workbench.action.terminal.focusAtIndex1",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 2 : focus terminal 2
|
||||
"key": "ctrl+a 2",
|
||||
"command": "workbench.action.terminal.focusAtIndex2",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + 3 : focus terminal 3
|
||||
"key": "ctrl+a 3",
|
||||
"command": "workbench.action.terminal.focusAtIndex3",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
|
||||
},
|
||||
{ // prefix + g : Go to recent directory
|
||||
"key": "ctrl+a g",
|
||||
"command": "workbench.action.terminal.goToRecentDirectory",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+g",
|
||||
"command": "-workbench.action.terminal.goToRecentDirectory",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{ // prefix + d : detach terminal
|
||||
"key": "ctrl+a d",
|
||||
"command": "workbench.action.terminal.detachSession",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{ // prefix + a : attach to session
|
||||
"key": "ctrl+a a",
|
||||
"command": "workbench.action.terminal.attachToSession",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a h",
|
||||
"command": "workbench.action.terminal.focusPreviousPane",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a i",
|
||||
"command": "workbench.action.terminal.focusNextPane",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+H",
|
||||
"command": "workbench.action.terminal.resizePaneLeft",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+N",
|
||||
"command": "workbench.action.terminal.resizePaneDown",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+E",
|
||||
"command": "workbench.action.terminal.resizePaneUp",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a shift+I",
|
||||
"command": "workbench.action.terminal.resizePaneRight",
|
||||
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
|
||||
},
|
||||
// #endregion
|
||||
// #region Misc
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "workbench.action.files.openFileFolder",
|
||||
"when": "isMacNative && openFolderWorkspaceSupport"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+o",
|
||||
"command": "-workbench.action.files.openFileFolder",
|
||||
"when": "isMacNative && openFolderWorkspaceSupport"
|
||||
},
|
||||
{
|
||||
"key": "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'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+o",
|
||||
"command": "-workbench.action.files.openFolderViaWorkspace",
|
||||
"when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'"
|
||||
},
|
||||
{
|
||||
"key": "f9",
|
||||
"command": "csdevkit.debug.noDebugFileLaunch"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "-editor.action.startFindReplaceAction",
|
||||
"when": "editorFocus || editorIsOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "-extension.vim_ctrl+h",
|
||||
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+r",
|
||||
"command": "-workbench.action.reloadWindow",
|
||||
"when": "isDevelopment"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+r",
|
||||
"command": "-workbench.action.terminal.runRecentCommand",
|
||||
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+r",
|
||||
"command": "-workbench.action.terminal.runRecentCommand",
|
||||
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+r",
|
||||
"command": "-rerunSearchEditorSearch",
|
||||
"when": "inSearchEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+r",
|
||||
"command": "-editor.action.refactor",
|
||||
"when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+r",
|
||||
"command": "workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
|
||||
"when": "inQuickOpen && inRecentFilesPicker"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+l",
|
||||
"command": "cursorLineStart",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "space",
|
||||
"command": "vspacecode.space",
|
||||
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
|
||||
},
|
||||
{
|
||||
"key": "space",
|
||||
"command": "vspacecode.space",
|
||||
"when": "sideBarFocus && !inputFocus && !whichkeyActive"
|
||||
},
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "extension.vim_tab",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"
|
||||
},
|
||||
{
|
||||
"key": "tab",
|
||||
"command": "-extension.vim_tab",
|
||||
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
|
||||
},
|
||||
{
|
||||
"key": "x",
|
||||
"command": "magit.discard-at-point",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "k",
|
||||
"command": "-magit.discard-at-point"
|
||||
},
|
||||
{
|
||||
"key": "-",
|
||||
"command": "magit.reverse-at-point",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "v",
|
||||
"command": "-magit.reverse-at-point"
|
||||
},
|
||||
{
|
||||
"key": "shift+-",
|
||||
"command": "magit.reverting",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "shift+v",
|
||||
"command": "-magit.reverting"
|
||||
},
|
||||
{
|
||||
"key": "shift+o",
|
||||
"command": "magit.resetting",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "shift+x",
|
||||
"command": "-magit.resetting"
|
||||
},
|
||||
{
|
||||
"key": "x",
|
||||
"command": "-magit.reset-mixed"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+u x",
|
||||
"command": "-magit.reset-hard"
|
||||
},
|
||||
{
|
||||
"key": "y",
|
||||
"command": "-magit.show-refs"
|
||||
},
|
||||
{
|
||||
"key": "y",
|
||||
"command": "vspacecode.showMagitRefMenu",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode == 'Normal'"
|
||||
},
|
||||
{
|
||||
"key": "g",
|
||||
"command": "-magit.refresh",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "g",
|
||||
"command": "vspacecode.showMagitRefreshMenu",
|
||||
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "workbench.action.quickOpenSelectNext",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "workbench.action.quickOpenSelectPrevious",
|
||||
"when": "inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "selectNextSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "selectPrevSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "acceptSelectedSuggestion",
|
||||
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "showNextParameterHint",
|
||||
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "showPrevParameterHint",
|
||||
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+j",
|
||||
"command": "selectNextCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k",
|
||||
"command": "selectPrevCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "acceptSelectedCodeAction",
|
||||
"when": "codeActionMenuVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+h",
|
||||
"command": "file-browser.stepOut",
|
||||
"when": "inFileBrowser"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+l",
|
||||
"command": "file-browser.stepIn",
|
||||
"when": "inFileBrowser"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+oem_4",
|
||||
"command": "whichkey.undoKey",
|
||||
"when": "whichkeyVisible"
|
||||
},
|
||||
{
|
||||
"key": "alt+e",
|
||||
"command": "editor.action.insertCursorAbove",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+up",
|
||||
"command": "-editor.action.insertCursorAbove",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+n",
|
||||
"command": "editor.action.insertCursorBelow",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+down",
|
||||
"command": "-editor.action.insertCursorBelow",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
// #endregion
|
||||
// #region Ctrl+W Remaps (Vim-like)
|
||||
{
|
||||
"key": "ctrl+w h",
|
||||
"command": "workbench.action.navigateLeft"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+h",
|
||||
"command": "workbench.action.toggleSidebarVisibility"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w l",
|
||||
"command": "workbench.action.navigateRight"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+l",
|
||||
"command": "workbench.action.toggleAuxiliaryBar"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w j",
|
||||
"command": "workbench.action.navigateDown"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+j",
|
||||
"command": "workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w k",
|
||||
"command": "workbench.action.navigateUp"
|
||||
},
|
||||
{ // original ^w
|
||||
"key": "ctrl+w ctrl+w",
|
||||
"command": "workbench.action.closeActiveEditor",
|
||||
"when": "editorFocus || inSettingsEditor || inKeybindings || inWelcome"
|
||||
},
|
||||
{ // :only
|
||||
"key": "ctrl+w o",
|
||||
"command": "runCommands",
|
||||
"args": {
|
||||
"commands": [
|
||||
"workbench.action.joinAllGroups",
|
||||
"workbench.action.maximizeEditorHideSidebar"
|
||||
]
|
||||
}
|
||||
},
|
||||
{ // :only
|
||||
"key": "ctrl+w ctrl+o",
|
||||
"command": "runCommands",
|
||||
"args": {
|
||||
"commands": [
|
||||
"workbench.action.joinAllGroups",
|
||||
"workbench.action.maximizeEditorHideSidebar"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w ctrl+w",
|
||||
"command": "workbench.action.closeGroup",
|
||||
"when": "activeEditorGroupEmpty && multipleEditorGroups"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w",
|
||||
"command": "-workbench.action.closeGroup",
|
||||
"when": "activeEditorGroupEmpty && multipleEditorGroups"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w d",
|
||||
"command": "editor.action.revealDefinitionAside"
|
||||
},
|
||||
// #endregion
|
||||
// #region Emacs like Cursor Movement
|
||||
{
|
||||
"key": "ctrl+f",
|
||||
"command": "cursorRight",
|
||||
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+b",
|
||||
"command": "cursorLeft",
|
||||
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+n",
|
||||
"command": "cursorDown",
|
||||
"when": "textInputFocus && !suggestWidgetVisible && !inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+p",
|
||||
"command": "cursorUp",
|
||||
"when": "textInputFocus && !suggestWidgetVisible && !inQuickOpen"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+a",
|
||||
"command": "cursorHome",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+a",
|
||||
"command": "cursorEnd",
|
||||
"when": "editor.action.selectAll"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+a",
|
||||
"command": "editor.action.selectAll"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+e",
|
||||
"command": "cursorEnd",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+b",
|
||||
"command": "cursorWordStartLeft",
|
||||
"when": "textInputFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+f",
|
||||
"command": "cursorWordStartRight",
|
||||
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
|
||||
},
|
||||
// #endregion
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "vspacecode.space"
|
||||
},
|
||||
// #region Search View
|
||||
{ // Focus on search list, therefore can use n/e to move up/down
|
||||
"key": "escape",
|
||||
"command": "search.action.focusSearchList",
|
||||
"when": "searchViewletFocus && inputBoxFocus"
|
||||
},
|
||||
{ // Focus on main input box
|
||||
"key": "l",
|
||||
"command": "workbench.action.replaceInFiles",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "r",
|
||||
"command": "toggleSearchRegex",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "w",
|
||||
"command": "toggleSearchWholeWord",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "c",
|
||||
"command": "toggleSearchCaseSensitive",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "p",
|
||||
"command": "toggleSearchPreserveCase",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "i",
|
||||
"command": "search.action.focusFilesToInclude",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+e",
|
||||
"command": "search.action.focusFilesToExclude",
|
||||
"when": "searchViewletFocus && !inputBoxFocus"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+3",
|
||||
"command": "editor.action.commentLine",
|
||||
"when": "editorTextFocus && !editorReadonly"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+/",
|
||||
"command": "-editor.action.commentLine",
|
||||
"when": "editorTextFocus && !editorReadonly"
|
||||
},
|
||||
// #endregion
|
||||
//#region Debugger
|
||||
{
|
||||
"key": "c",
|
||||
"command": "workbench.action.debug.continue",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "t",
|
||||
"command": "workbench.action.debug.stepInto",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "s",
|
||||
"command": "workbench.action.debug.stepOver",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "r",
|
||||
"command": "workbench.action.debug.restart",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "g c",
|
||||
"command": "editor.debug.action.runToCursor",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "g h",
|
||||
"command": "editor.debug.action.showDebugHover",
|
||||
"when": "inDebugMode && debugState == 'stopped' && vim.mode == 'Normal' && editorFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+w f",
|
||||
"command": "search.action.openNewEditorToSide"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+k ctrl+shift+c",
|
||||
"command": "vspacecode.copyFilenameBase"
|
||||
}
|
||||
]
|
||||
173
misc/vscode/vscode.former.vimrc
Normal file
173
misc/vscode/vscode.former.vimrc
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
" ~/.config/vscode/vscode.vimrc
|
||||
" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc
|
||||
" ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc
|
||||
" And go to vscode vim setting:
|
||||
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
||||
|
||||
|
||||
" Arrow remap
|
||||
noremap n j
|
||||
noremap e k
|
||||
noremap i l
|
||||
|
||||
" Switch between tabs
|
||||
noremap H :bprevious<CR>
|
||||
noremap I :bnext<CR>
|
||||
|
||||
noremap N 5j
|
||||
noremap E 5k
|
||||
|
||||
" Similar position to i
|
||||
" The `noremap` implements text-object-like behavior in VSCodeVim
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
" Define in settings.json, since this will remap <esc> under visual mode
|
||||
" noremap <esc> :nohlsearch<CR>
|
||||
|
||||
" 分词版本的w和b,支持中文,需要插件
|
||||
" 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap`
|
||||
" Comment if you don't use cjk or the plugin
|
||||
nmap w cjkWordHandler.cursorWordEndRight
|
||||
nmap b cjkWordHandler.cursorWordStartLeft
|
||||
|
||||
" keep selection after indent (define in settings.json)
|
||||
" voremap < <gv
|
||||
" voremap > >gv
|
||||
|
||||
" lsp
|
||||
noremap gi editor.action.goToImplementation
|
||||
noremap gpi editor.action.peekImplementation
|
||||
noremap gd editor.action.goToDefinition
|
||||
noremap gpd editor.action.peekDefinition
|
||||
noremap gt editor.action.goToTypeDefinition
|
||||
noremap gpt editor.action.peekTypeDefinition
|
||||
noremap gh editor.action.showDefinitionPreviewHover
|
||||
noremap gr editor.action.goToReferences
|
||||
noremap gpr editor.action.referenceSearch.trigger
|
||||
|
||||
noremap zR editor.foldAll
|
||||
|
||||
noremap <leader><leader> workbench.action.quickOpen
|
||||
noremap <leader>/ workbench.action.quickTextSearch
|
||||
noremap <leader>: workbench.action.showCommands
|
||||
noremap <leader>E workbench.view.explorer
|
||||
noremap <leader>- workbench.action.splitEditorDown
|
||||
noremap <leader>| workbench.action.splitEditorRight
|
||||
noremap <leader>\ workbench.action.splitEditorRight
|
||||
|
||||
" <leader>a : +ai/action
|
||||
noremap <leader>aa inlineChat.start
|
||||
noremap <leader>aA workbench.panel.chat
|
||||
noremap <leader>ae workbench.action.chat.openEditSession
|
||||
|
||||
" <leader>b : +buffer
|
||||
noremap <leader>bb workbench.action.showAllEditors
|
||||
noremap <leader>bd :bdelete<CR>
|
||||
noremap <leader>bh :bprevious<CR>
|
||||
noremap <leader>bi :bnext<CR>
|
||||
noremap <leader>bp :bprevious<CR>
|
||||
noremap <leader>bn :bnext<CR>
|
||||
|
||||
" <leader>c : +code/compile
|
||||
noremap <leader>cr code-runner.run
|
||||
noremap <leader>cf editor.action.formatDocument
|
||||
noremap <leader>c<leader> editor.action.trimTrailingWhitespace
|
||||
noremap <leader>cs workbench.action.gotoSymbol
|
||||
noremap <leader>cS workbench.action.showAllSymbols
|
||||
noremap <leader>ce editor.action.marker.next
|
||||
noremap <leader>cE editor.action.marker.prev
|
||||
noremap <leader>cg editor.action.dirtydiff.next
|
||||
noremap <leader>cG editor.action.dirtydiff.previous
|
||||
noremap <leader>cR editor.action.rename
|
||||
|
||||
" <leader>d : +debug
|
||||
|
||||
" <leader>f : +file
|
||||
noremap <leader>ff workbench.action.quickOpen
|
||||
noremap <leader>fF workbench.view.search
|
||||
noremap <leader>fc workbench.action.openSettings
|
||||
noremap <leader>fC workbench.action.openFolderSettingsFile
|
||||
noremap <leader>fe workbench.view.explorer
|
||||
noremap <leader>fo openInExternalApp.open
|
||||
noremap <leader>fr workbench.action.showAllEditorsByMostRecentlyUsed
|
||||
" Can only rename tracked files
|
||||
noremap <leader>fR git.rename
|
||||
" noremap <leader>fs workbench.action.search.toggleQueryDetails
|
||||
noremap <leader>ft workbench.action.terminal.toggleTerminal
|
||||
noremap <leader>fx workbench.view.extensions
|
||||
|
||||
" <leader>g : +git
|
||||
noremap <leader>gg workbench.view.scm
|
||||
noremap <leader>gS git.stageAll
|
||||
|
||||
" <leader>h : +help
|
||||
|
||||
" <leader>j : +jump
|
||||
noremap <leader>jj workbench.action.gotoLine
|
||||
|
||||
" <leader>l : +language (define in settings.json)
|
||||
|
||||
" <leader>p : +project (requires Project Manager extension)
|
||||
noremap <leader>pp projectManager.listProjects
|
||||
noremap <leader>pP projectManager.listAnyProjects#sideBarAny
|
||||
noremap <leader>pc projectManager.openSettings#sideBarAny
|
||||
noremap <leader>pe projectManager.editProjects
|
||||
noremap <leader>pf projectManager.addToFavorites
|
||||
noremap <leader>pF projectManager.filterProjectsByTag
|
||||
noremap <leader>pg projectManager.listGitProjects#sideBarGit
|
||||
noremap <leader>pr workbench.action.openRecent
|
||||
noremap <leader>ps projectManager.saveProject
|
||||
|
||||
" <leader>q : +quit
|
||||
noremap <leader>qq :quit<CR>
|
||||
noremap <leader>qQ :qall<CR>
|
||||
noremap <leader>Q :quit<CR>
|
||||
|
||||
" <leader>r : +refactor
|
||||
|
||||
" <leader>s : +search
|
||||
|
||||
" <leader>t : +test
|
||||
noremap <leader>tt testing.runAll
|
||||
noremap <leader>tT testing.debugAll
|
||||
noremap <leader>ta testing.runAll
|
||||
noremap <leader>tA testing.debugAll
|
||||
noremap <leader>tf testing.reRunFailedTests
|
||||
noremap <leader>tF testing.debugFailedTests
|
||||
noremap <leader>tl testing.reRunLastRun
|
||||
noremap <leader>tL testing.debugLastRun
|
||||
noremap <leader>tc testing.runCurrentTest
|
||||
noremap <leader>tC testing.debugCurrentTest
|
||||
noremap <leader>tx testing.cancelTestRun
|
||||
|
||||
" <leader>u : +ui
|
||||
noremap <leader>ui workbench.action.selectTheme
|
||||
noremap <leader>uw editor.action.toggleWordWrap
|
||||
noremap <leader>uz workbench.action.toggleZenMode
|
||||
|
||||
" <leader>w : +write/window
|
||||
noremap <leader>ww :write<CR>
|
||||
noremap <leader>wa :wall<CR>
|
||||
noremap <leader>wq :wq<CR>
|
||||
noremap <leader>W :write<CR>
|
||||
noremap <leader>wh workbench.action.focusLeftGroup
|
||||
noremap <leader>wH workbench.action.splitEditorLeft
|
||||
noremap <leader>wn workbench.action.focusBelowGroup
|
||||
noremap <leader>wN workbench.action.splitEditorDown
|
||||
noremap <leader>we workbench.action.focusAboveGroup
|
||||
noremap <leader>wE workbench.action.splitEditorUp
|
||||
noremap <leader>wi workbench.action.focusRightGroup
|
||||
noremap <leader>wI workbench.action.splitEditorRight
|
||||
noremap <leader>w- workbench.action.splitEditorDown
|
||||
noremap <leader>w| workbench.action.splitEditorRight
|
||||
noremap <leader>w\ workbench.action.splitEditorRight
|
||||
79
misc/vscode/vscode.vimrc
Normal file
79
misc/vscode/vscode.vimrc
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
" ~/.config/vscode/vscode.vimrc
|
||||
" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc
|
||||
" ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc
|
||||
" And go to vscode vim setting:
|
||||
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
||||
|
||||
" For all available options see
|
||||
" https://github.com/VSCodeVim/Vim/blob/d41e286e9238b004f02b425d082d3b4181d83368/src/configuration/vimrc.ts#L120-L407
|
||||
|
||||
|
||||
" Use VSpaceCode instead of <leader>
|
||||
noremap <space> vspacecode.space
|
||||
|
||||
|
||||
" Switch between tabs
|
||||
nnoremap H :bprevious<CR>
|
||||
nnoremap L :bnext<CR>
|
||||
vnoremap H ^
|
||||
xnoremap H ^
|
||||
onoremap H ^
|
||||
vnoremap L $
|
||||
xnoremap L $
|
||||
onoremap L $
|
||||
|
||||
|
||||
noremap J 5j
|
||||
noremap K 5k
|
||||
|
||||
" Similar position to i
|
||||
" The `noremap` implements text-object-like behavior in VSCodeVim
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
nnoremap <esc> removeSecondaryCursors
|
||||
|
||||
|
||||
" lsp
|
||||
noremap gi editor.action.goToImplementation
|
||||
noremap gpi editor.action.peekImplementation
|
||||
noremap gd editor.action.goToDefinition
|
||||
noremap gpd editor.action.peekDefinition
|
||||
noremap gt editor.action.goToTypeDefinition
|
||||
noremap gpt editor.action.peekTypeDefinition
|
||||
noremap gh editor.action.showDefinitionPreviewHover
|
||||
noremap gr editor.action.goToReferences
|
||||
noremap gpr editor.action.referenceSearch.trigger
|
||||
noremap ga editor.action.quickFix
|
||||
|
||||
" Rename, or [c]hange [d]efinition
|
||||
nnoremap cd editor.action.rename
|
||||
|
||||
" Requires matchit by redguardtoo
|
||||
" nnoremap % extension.matchitJumpItems
|
||||
|
||||
noremap zR editor.foldAll
|
||||
|
||||
" keep selection after indent
|
||||
vnoremap < editor.action.outdentLines
|
||||
vnoremap > editor.action.indentLines
|
||||
|
||||
nnoremap [g editor.action.editor.previousChange
|
||||
nnoremap ]g editor.action.editor.nextChange
|
||||
|
||||
" 分词版本的w和b,支持中文,需要插件
|
||||
" 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap`
|
||||
" Comment if you don't use cjk or the plugin
|
||||
" This is buggy
|
||||
"nmap w cjkWordHandler.cursorWordEndRight
|
||||
"nmap b cjkWordHandler.cursorWordStartLeft
|
||||
|
||||
" <C-w> will be parsed by VSCode itself.
|
||||
" noremap <C-w>n <C-w>j
|
||||
" noremap <C-w>e <C-w>k
|
||||
" noremap <C-w>i <C-w>l
|
||||
" noremap <C-w>x workbench.action.toggleEditorGroupLayout
|
||||
" " Use C-w C-w as original C-w
|
||||
" noremap <C-w><C-w> workbench.action.closeActiveEditor
|
||||
" noremap <C-w><A-n> workbench.action.togglePanel
|
||||
89
misc/windows/Microsoft.PowerShell_profile.ps1
Normal file
89
misc/windows/Microsoft.PowerShell_profile.ps1
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# $DOTFILES/platforms\win\Microsoft.PowerShell_profile.ps1
|
||||
# Date: 2024-12-01
|
||||
# Author: js0ny
|
||||
# PowerShell profile for Windows
|
||||
|
||||
### Load Configs ###
|
||||
$DOTFILES = Join-Path $HOME ".dotfiles"
|
||||
Get-ChildItem -Path $(Join-Path $DOTFILES "tools" "powershell") -Filter *.ps1 | ForEach-Object { . $_ }
|
||||
|
||||
### Aliases ###
|
||||
|
||||
|
||||
# Toggle Theme #
|
||||
Set-Alias "dark-mode" "$DOTFILES\platforms\win\cmd\dark-mode.bat" # Consistent with macOS (`dark-mode`)
|
||||
|
||||
# Miscs #
|
||||
|
||||
### Misc ###
|
||||
${function:qwen} = "ollama run qwen2.5:14b"
|
||||
|
||||
## Conda ##
|
||||
#region conda initialize
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
If (Test-Path "$HOME\miniconda3\Scripts\conda.exe") {
|
||||
(& "$HOME\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Where-Object { $_ } | Invoke-Expression
|
||||
}
|
||||
#endregion
|
||||
|
||||
## Check Start Up ##
|
||||
#$SystemlogFilePath = "$env:USERPROFILE\.PowerShellStartup.log"
|
||||
## 检查日志文件是否存在
|
||||
#if (-not (Test-Path $SystemlogFilePath)) {
|
||||
# New-Item -Path $SystemlogFilePath -ItemType File -Force | Out-Null
|
||||
#}
|
||||
## 读取日志文件的最后一行(即上次启动日期)
|
||||
#$__lastStartup = Get-Content -Path $SystemlogFilePath -Tail 1 -ErrorAction SilentlyContinue
|
||||
#$_currentDate = (Get-Date).ToString("yyyy-MM-dd")
|
||||
#if (-not ($__lastStartup -eq $_currentDate)) {
|
||||
# Get-Date
|
||||
# Update-ForexData &
|
||||
# Write-Host "今天是第一次启动 PowerShell。"
|
||||
# # 记录当前日期到日志文件
|
||||
# $_currentDate | Out-File -FilePath $SystemlogFilePath -Append
|
||||
#}
|
||||
#Remove-Variable SystemlogFilePath
|
||||
#Remove-Variable __lastStartup
|
||||
#Remove-Variable _currentDate
|
||||
|
||||
# Set default applications
|
||||
|
||||
$Env:PAGER = "less"
|
||||
$Env:EDITOR = "code --wait"
|
||||
$Env:VISUAL = "code --wait"
|
||||
$Env:FILE_MANAGER = "dopus.exe"
|
||||
|
||||
|
||||
${function:wini} = { winget install $args }
|
||||
${function:winr} = { winget uninstall $args }
|
||||
${function:wins} = { winget search $args }
|
||||
${function:winu} = { winget upgrade $args }
|
||||
|
||||
${function:pkill} = { Get-Process *$args* | Stop-Process -Force }
|
||||
|
||||
|
||||
${function:tmux} = { wsl.exe tmux $args }
|
||||
|
||||
if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) {
|
||||
Invoke-Expression (&sfsu.exe hook)
|
||||
}
|
||||
|
||||
# Elevate in current shell
|
||||
# Set Windows Sudo to `inlined` sudo
|
||||
${function:su} = { sudo.exe pwsh }
|
||||
|
||||
function Show-WindowsNotification {
|
||||
param (
|
||||
[string]$Title,
|
||||
[Parameter(ValueFromPipeline=$true)]
|
||||
[string]$Message
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
$notifyIcon = New-Object System.Windows.Forms.NotifyIcon
|
||||
$notifyIcon.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon((Get-Command pwsh).Source)
|
||||
$notifyIcon.Visible = $true
|
||||
$notifyIcon.ShowBalloonTip(0,$Title,$Message,[System.Windows.Forms.ToolTipIcon]::Info)
|
||||
}
|
||||
|
||||
Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
|
||||
90
misc/windows/SumatraPDF-shortcuts.txt
Normal file
90
misc/windows/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 = ?
|
||||
]
|
||||
]
|
||||
57
misc/windows/fastfetch.jsonc
Normal file
57
misc/windows/fastfetch.jsonc
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
// %UserProfile%\.config\fastfetch\config.jsonc
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
// "type": "auto",
|
||||
"source": "Windows 7",
|
||||
"padding": {
|
||||
"top": 2,
|
||||
"left": 1,
|
||||
"right": 2
|
||||
}
|
||||
},
|
||||
"general": {
|
||||
"multithreading": true
|
||||
},
|
||||
"display": {
|
||||
"separator": " ",
|
||||
"key": {
|
||||
"width": 10,
|
||||
"paddingLeft": 2,
|
||||
"type": "icon"
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "title",
|
||||
"format": "{#1}───────────── {#}{user-name-colored}@{host-name-colored}"
|
||||
},
|
||||
{
|
||||
"type": "colors",
|
||||
"symbol": "diamond",
|
||||
"paddingLeft": 15
|
||||
},
|
||||
"os",
|
||||
"host",
|
||||
"kernel",
|
||||
"uptime",
|
||||
{
|
||||
"type": "packages"
|
||||
},
|
||||
"shell",
|
||||
"display",
|
||||
"icons",
|
||||
"font",
|
||||
"cursor",
|
||||
"terminal",
|
||||
"terminalfont",
|
||||
"cpu",
|
||||
"gpu",
|
||||
"memory",
|
||||
"swap",
|
||||
"disk",
|
||||
"battery",
|
||||
"poweradapter",
|
||||
"locale"
|
||||
]
|
||||
}
|
||||
18
misc/windows/neovide.toml
Normal file
18
misc/windows/neovide.toml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
fork = false
|
||||
frame = "full"
|
||||
idle = true
|
||||
maximized = false
|
||||
no-multigrid = false
|
||||
srgb = false
|
||||
tabs = true
|
||||
theme = "auto"
|
||||
title-hidden = true
|
||||
vsync = false
|
||||
wsl = true
|
||||
|
||||
[font]
|
||||
normal = [
|
||||
"Iosevka Nerd Font",
|
||||
"霞鹜文楷等宽",
|
||||
] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
82
misc/windows/readme.md
Normal file
82
misc/windows/readme.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Windows dotfiles
|
||||
|
||||

|
||||
|
||||
- Terminal Emulator: [WezTerm](../../tools/wezterm/)
|
||||
- Tiling Window Manager: [GlazeWM](./glzr/glazewm/config.yaml)
|
||||
- Status Bar: [Zebar](./glzr/zebar/settings.json)
|
||||
- Quake Terminal: [Windows Terminal](./WindowsTerminal.json)
|
||||
- Shell: [PowerShell Core](../../tools/powershell/readme.md)
|
||||
- WSL1: [Arch Linux](https://github.com/yuk7/ArchWSL)
|
||||
- WSL2: kali-linux
|
||||
|
||||
By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix, some of the software(like `wezterm`) will use these directories as the default configuration path:
|
||||
|
||||
| Windows Path | XDG-Equivalent | Default |
|
||||
|------------|----------|----------|
|
||||
| `%APPDATA%` | `$XDG_CONFIG_HOME` | `%USERPROFILE%\AppData\Roaming` |
|
||||
| `%LOCALAPPDATA%` | `$XDG_DATA_HOME` | `%USERPROFILE%\AppData\Local` |
|
||||
| `%LOCALAPPDATA%\Cache` | `$XDG_CACHE_HOME` | `%USERPROFILE%\AppData\Local\Cache` |
|
||||
| `%LOCALAPPDATA%\State` | `$XDG_STATE_HOME` | `%USERPROFILE%\AppData\Local\State` |
|
||||
|
||||
An example bootstrap script is provided in [bootstrap/Windows.ps1](../../bootstrap/Windows.ps1), which will create necessary directories and link the files.
|
||||
|
||||
## PowerShell Profile
|
||||
|
||||
This is the *[PowerShell Core](https://github.com/PowerShell/PowerShell)* profile, not the legacy *Windows PowerShell* profile, which is faster(`powershell` vs `pwsh`, `pwsh` types 6 letters less lol), cross-platform and compatible with Unix.
|
||||
|
||||
By default, PowerShell profile is stored in `%UserProfile%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`.
|
||||
|
||||
It is convenient to use `$PROFILE` to locate the profile file.
|
||||
|
||||
```powershell
|
||||
Test-Path $PROFILE
|
||||
```
|
||||
|
||||
Just like Unix Shell, there are configs work for different sessions. To locate them, use `select *` followed by `$PROFILE`.
|
||||
|
||||
If you want to change the `AllUsers` scoped profile, do not install `pwsh` via `winget`, use `scoop` instead, since `winget` will install `pwsh` to `%ProgramFiles%\PowerShell\7\pwsh.exe`, which is read-only even with Administrator privileges.
|
||||
|
||||
```powershell
|
||||
PS > $PROFILE | Select *
|
||||
AllUsersAllHosts : C:\Users\jsony\scoop\apps\pwsh\current\profile.ps1
|
||||
AllUsersCurrentHost : C:\Users\jsony\scoop\apps\pwsh\current\Microsoft.PowerShell_profile.ps1
|
||||
CurrentUserAllHosts : C:\Users\jsony\Documents\PowerShell\profile.ps1
|
||||
CurrentUserCurrentHost : C:\Users\jsony\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
|
||||
Length : 68
|
||||
```
|
||||
|
||||
Note that the variable `$PROFILE.*` are constants, the only way to change it is to compile your own `pwsh`
|
||||
|
||||
To link the profile file:
|
||||
|
||||
```powershell
|
||||
New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -Force
|
||||
```
|
||||
|
||||
I use [starship](https://starship.rs/) to customize the prompt, which is located in [`tools/starship/starship_pwsh.toml`](../../tools/starship/starship_pwsh.toml). This prompt config is cross-platform for powershell core, since I use the prompt to identify the shell.
|
||||
|
||||
## `.wslconfig` - WSL2 Configuration
|
||||
|
||||
`.wslconfig` only supports `%UserProfile%\.wslconfig` as the configuration path
|
||||
|
||||
```powershell
|
||||
New-Item -ItemType SymbolicLink -Path "$Env:UserProfile\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
||||
```
|
||||
<!--
|
||||
## Windows Terminal
|
||||
|
||||
Use Hard Link to sync Windows Terminal Settings since it doesn't support symlink.
|
||||
|
||||
```powershell
|
||||
New-Item -ItemType HardLink -Path "$Env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Target "$DOTFILES\win\WindowsTerminal.json" -Force
|
||||
```
|
||||
-->
|
||||
|
||||
## Neovide
|
||||
|
||||
Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml`
|
||||
|
||||
```powershell
|
||||
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
||||
```
|
||||
10
misc/windows/start/KMonad.ps1
Normal file
10
misc/windows/start/KMonad.ps1
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
if (Get-Command "kmonad" -ErrorAction SilentlyContinue) {
|
||||
$KMonadPath = (Get-Command "kmonad").Source
|
||||
}
|
||||
else {
|
||||
$KMonadPath = "D:\bin\kmonad.exe"
|
||||
}
|
||||
|
||||
$KMonadConfig = "$Env:DOTFILES\tools\kmonad\windows.kbd"
|
||||
|
||||
Start-Process -FilePath $KMonadPath -ArgumentList $KMonadConfig -WindowStyle Hidden
|
||||
45
misc/windows/vsvimrc
Normal file
45
misc/windows/vsvimrc
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
" This is the `vimrc` config for VSVim (Visual Studio Vim Emulator)
|
||||
" Put it in %Vim%\.vsvimrc
|
||||
|
||||
" Colemak Keys
|
||||
|
||||
" Arrow remap
|
||||
noremap n j
|
||||
noremap e k
|
||||
noremap i l
|
||||
nnoremap N 5j
|
||||
nnoremap E 5k
|
||||
vnoremap H ^
|
||||
xnoremap H ^
|
||||
onoremap H ^
|
||||
vnoremap I $
|
||||
xnoremap I $
|
||||
onoremap I $
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Normal minimal setup
|
||||
|
||||
noremap Y y$
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set autoindent
|
||||
set smartindent
|
||||
set wrap
|
||||
set scrolloff=3
|
||||
set hlsearch
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
Loading…
Add table
Add a link
Reference in a new issue