-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvimrc.lua
More file actions
30 lines (26 loc) · 722 Bytes
/
vimrc.lua
File metadata and controls
30 lines (26 loc) · 722 Bytes
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
vim.keymap.set("n", "<F6>", function()
vim.cmd[[term ./nob -d]]
end)
vim.keymap.set("n", "<F7>", function()
vim.cmd(":term sudo ./tools/gdb_attach.sh");
end)
vim.opt.smartindent = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.nu = true
vim.opt.relativenumber = true
vim.keymap.set("n", "<F5>", function()
dap.list_breakpoints()
local file = io.open("BPS", "w");
if file == nil then
print("Faile to open a file")
return
end
for _, ql in ipairs(vim.fn.getqflist()) do
local s = string.format("%s:%d\n", vim.fn.getbufinfo(ql.bufnr)[1].name, ql.lnum);
file:write(s)
end
file:close()
vim.cmd[[silent !gf2 --command=tools/gdb_debug.py ./brplot &]]
end)