-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
71 lines (61 loc) · 2.65 KB
/
init.lua
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
--[[ init.d -------------------------------------------------------------------
This init.lua does not contain any customisation, but instead runs all files
under init/ in lexicographical order. Those files are prefixed with 2 numbers
for ordering:
00 -- global init
10 -- plugin configuration
20 -- LSP
30 -- Options
40 -- UI configuration
50 -- Mappings & editing configuration
60 -- Autocmds
70 -- Misc
80 -- (unused)
90 -- after init
-- Notes ----------------------------------------------------------------------
more motions would be nice:
- H/M/L aren't really that useful by default
-- Mapping Chart --------------------------------------------------------------
---|----------------|-------------------------|----------------
key| regular | shift | ctrl
---|----------------|-------------------------|----------------
q | record | code action | ?
w | word | WORD | multi (window)
e | end | END | scroll down
r | replace char | replace mode | redo
t | til | til prev | ?
y | yank | y$ | scroll up
u | undo | ? | up 1/2 page
i | insert | insert at start | (=tab) fold
o | new line after | new line before | older pos
p | paste after | past before | newer pos
a | append | append at end | increment
s | segment | change line | ?
d | delete | d$ | down 1/2 page
f | find | find prev | down page
g | many | last line | ?git info
h | left | ?high | win left
j | down | join | win down
k | up | hover/help | win up
l | right | ?low | win right
z | many | ?save or quit | suspend
x | delete char | ?delete before cursor | decrement
c | change | c$ | interrupt
v | visual | visual line | visual block
b | back | BACK | up page
n | next match | prev match | ?
m | mark | ?mid | ?
---|----------------|-------------------------|----------------
other keys
--]]
if vim.g.vscode ~= nil then
return -- config is wholly incompatible
end
local files = vim.fn.globpath(vim.fn.stdpath("config"), "init/*", false, true)
table.sort(files)
for _, file in ipairs(files) do
local ok, err = pcall(vim.cmd.source, file)
if not ok then
vim.api.nvim_err_write(err)
end
end