2024-02-23 05:14:23 +00:00
|
|
|
vim.cmd("set mouse=")
|
|
|
|
vim.cmd("set number relativenumber")
|
|
|
|
vim.cmd("set nowrap")
|
|
|
|
vim.cmd("set scrolloff=9")
|
|
|
|
vim.cmd("set tabstop=4")
|
|
|
|
vim.cmd("set shiftwidth=4")
|
|
|
|
vim.cmd("set ignorecase smartcase")
|
|
|
|
|
|
|
|
vim.keymap.set('n', '<space>ff', '<cmd>Telescope find_files<cr>')
|
|
|
|
vim.keymap.set('n', '<space>fr', '<cmd>Telescope oldfiles<cr>')
|
|
|
|
vim.keymap.set('n', '<space>fg', '<cmd>Telescope git_files<cr>')
|
|
|
|
|
|
|
|
vim.keymap.set('n', '>', '>>^')
|
|
|
|
vim.keymap.set('n', '<', '<<^')
|
|
|
|
vim.keymap.set('v', '<', '<gv^')
|
|
|
|
vim.keymap.set('v', '>', '>gv^')
|
|
|
|
|
|
|
|
vim.keymap.set('n', '<A-j>', '}')
|
|
|
|
vim.keymap.set('n', '<A-k>', '{')
|
|
|
|
vim.keymap.set('v', '<A-j>', '}')
|
|
|
|
vim.keymap.set('v', '<A-k>', '{')
|
|
|
|
|
|
|
|
vim.keymap.set('n', '<space>w', '<cmd>w<cr>')
|
|
|
|
vim.keymap.set('n', '<space>q', '<cmd>q<cr>')
|
|
|
|
vim.keymap.set('n', '<space>c', '<cmd>:bdelete<cr>')
|
|
|
|
vim.keymap.set('n', '<A-h>', '<cmd>bprevious<cr>')
|
|
|
|
vim.keymap.set('n', '<A-l>', '<cmd>bnext<cr>')
|
|
|
|
|
|
|
|
vim.keymap.set('n', "<C-Up>", "<cmd>resize -2<cr>")
|
|
|
|
vim.keymap.set('n', "<C-Down>", "<cmd>resize +2<cr>")
|
|
|
|
vim.keymap.set('n', "<C-Left>", "<cmd>vertical resize -2<cr>")
|
|
|
|
vim.keymap.set('n', "<C-Right>", "<cmd>vertical resize +2<cr>")
|
|
|
|
|
2024-02-28 14:32:37 +00:00
|
|
|
vim.cmd("autocmd TermOpen * setlocal nonumber norelativenumber signcolumn=no")
|
2024-02-23 05:14:23 +00:00
|
|
|
for _, key in pairs({ 'h', 'j', 'k', 'l' }) do
|
|
|
|
for _, mod in pairs({ 'C', 'A' }) do
|
|
|
|
vim.keymap.set(
|
|
|
|
't',
|
|
|
|
'<' .. mod .. '-' .. key .. '>',
|
|
|
|
'<C-\\><C-n><' .. mod .. '-' .. key .. '>',
|
|
|
|
{ remap = true }
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
|
|
callback = function()
|
|
|
|
vim.highlight.on_yank()
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
local fname = os.getenv("HOME") .. "/.bck-nvim.lua"
|
|
|
|
local f = io.open(fname, "r")
|
|
|
|
if f ~= nil then
|
|
|
|
io.close(f)
|
|
|
|
vim.cmd('luafile ' .. fname)
|
|
|
|
end
|