-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
123 lines (105 loc) · 4.85 KB
/
config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Configuration goals:
# - change modes as little as possible
# - decrease the amount of shortcuts you need to master
# - everyday use-cases have priority
# suggested themes:
# - ayu_mirage
# - catppuccin_macchiato
# - gruvbox_light
# - hex_toxic
# - material_deep_ocean
# - material_palenight
# - monokai_pro_octagon
# - new_moon
# - nightfox
# - serika-dark
# - yellowed
theme = "nightfox"
[editor]
true-color = true
bufferline = "always"
line-number = "relative"
rulers = [120]
scroll-lines = 1
gutters = ["diagnostics", "spacer", "line-numbers", "spacer", "diff"]
[editor.whitespace.characters]
tabpad = "·"
[editor.cursor-shape]
insert = "block"
normal = "block"
select = "underline"
[editor.statusline]
left = ["mode", "spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
center = ["diagnostics"]
right = ["selections", "register", "position", "file-encoding"]
[keys.normal] # do not sort!
esc = ["collapse_selection", "keep_primary_selection"] # deselect all; keep primary cursor only
tab = "goto_next_function" # select and jump to the next function via Treesitter
S-tab = "goto_prev_function" # select and jump to the previous function via Treesitter
end = "goto_line_end_newline" # stop at linebreak; this is more useful
C-end = "goto_line_end" # stop at last character
del = ["move_next_word_end", "move_prev_word_end", "move_next_word_end", "delete_selection_noyank"] # delete current word
C-del = "toggle_comments" # kind of delete, but not really =D
# C-backspace cannot be mapped
backspace = ["delete_char_backward"] # counterpart for `d`
A-backspace = ["move_prev_word_start", "delete_selection"] # delete word barckwards
j = "save_selection" # add to jumplist; a waste to not use `j` to save jump positions
k = "jump_backward" # prev jump item
l = "jump_forward" # next jump item
p = "paste_before" # switched with P
P = "paste_after" # switched with p
C-left = ["move_prev_word_start", "collapse_selection"] # move cursor one word left
C-right = ["move_next_word_end", "collapse_selection"] # move cursor one word right
A-down = ["extend_to_line_bounds", "delete_selection", "paste_after"] # move line down; like vscode
A-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"] # moves line up; like vscode
# C-w changes mode; we leave it alone
w = ["move_next_word_end", "move_prev_word_start", "move_next_word_end"] # select word under cursor
W = ["move_next_long_word_end", "move_prev_long_word_start", "move_next_long_word_end"] # select WORD under cursor
o = ["open_above", "normal_mode"] # do not leave normal mode
O = ["open_below", "normal_mode"] # do not leave normal mode
C-s = ":w" # save
D = ["ensure_selections_forward", "extend_to_line_end", "delete_selection"] # delete from current position until EOL
X = "extend_line_above" # select line; if selected, select above line
C-x = ["ensure_selections_forward", "extend_to_line_end"] # select from current to EOL
C-q = ":q" # quit
A-q = ":q!" # force quit
a = "switch_to_lowercase" # `
A = "switch_to_uppercase" # A-`
C-a = "switch_case"
C = ["move_next_word_end", "delete_selection", "insert_mode"] # replace word
C-v = "paste_clipboard_before" # paste from clipboard
C-c = "yank_to_clipboard" # copy to clipboard
# space mode mapping
space.p = "paste_clipboard_before" # switched with P
space.P = "paste_clipboard_after" # switched with p
[keys.insert]
A-e = ["move_next_long_word_start"] # move to next WORD
A-q = [":q!"]
A-u = ["redo"]
A-w = ["move_next_long_word_end", "move_prev_long_word_start", "move_next_long_word_end"] # select WORD under cursor
A-x = ["extend_line_above"] # map:x
C-c = "yank_to_clipboard" # copy to clipboard
C-d = ["delete_selection"] # delete selection
C-del = ["move_next_word_start", "delete_selection"] # delete next word
C-e = ["move_next_word_start"] # move to next word
C-o = ["open_above"] # in-place, new line
C-p = ["paste_before"] # map:P
C-q = [":q"]
C-s = ["normal_mode",":w"] # save file
C-space = ["completion"]
C-u = ["undo"]
C-v = ["paste_clipboard_before"]
C-w = ["move_next_word_end", "move_prev_word_end", "move_next_word_end"] # select word under cursor
C-x = ["extend_line_below"] # map:X
C-y = ["yank"] # yank selection to register
# moving the cursor with arrows, remove selection
left = ["collapse_selection", "move_char_left"]
right = ["collapse_selection", "move_char_right"]
up = ["collapse_selection", "move_line_up"]
down = ["collapse_selection", "move_line_down"]
C-left = ["move_prev_word_start"] # jump and select word left
C-right = ["move_next_word_end"] # jump and select word right
A-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before", "move_line_up"] # moves line up; like vscode
A-down = ["extend_to_line_bounds", "delete_selection", "paste_after", "move_line_down"] # move line down; like vscode
[keys.select]
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"] # go to the simplest scenario!