2022-12-31 17:43:31 +01:00
|
|
|
local g = vim.g
|
|
|
|
local opt = vim.opt
|
|
|
|
|
|
|
|
g.mapleader = ' '
|
|
|
|
g.tex_flavor = 'latex'
|
2023-03-21 07:15:59 +01:00
|
|
|
g.c_syntax_for_h = true
|
2024-01-19 11:30:25 +01:00
|
|
|
vim.cmd [[
|
2023-07-03 22:20:19 +02:00
|
|
|
let g:VM_default_mappings = 0
|
|
|
|
let g:VM_mouse_mappings = 1
|
2023-07-02 22:17:37 +02:00
|
|
|
let g:VM_leader = {'default': ',', 'visual': ',', 'buffer': ','}
|
|
|
|
let g:VM_maps = {}
|
|
|
|
let g:VM_maps['i'] = 'l'
|
|
|
|
let g:VM_maps['I'] = 'L'
|
2023-07-03 22:53:55 +02:00
|
|
|
let g:VM_maps['Find Under'] = '<c-h>'
|
2023-09-05 11:36:24 +02:00
|
|
|
let g:VM_maps["Add Cursor At Pos"] = ',,'
|
2023-07-03 22:53:55 +02:00
|
|
|
let g:VM_maps['Find Subword Under'] = '<c-h>'
|
2023-07-03 22:20:19 +02:00
|
|
|
let g:VM_maps["Add Cursor Down"] = '<C-n>'
|
|
|
|
let g:VM_maps["Add Cursor Up"] = '<C-e>'
|
|
|
|
let g:VM_maps['Find Next'] = 'k'
|
|
|
|
let g:VM_maps['Find Prev'] = 'K'
|
|
|
|
let g:VM_custom_motions = {'n': 'j', 'j': 'n', 'l': 'i', 'e': 'k', 'i': 'l'}
|
2023-08-27 17:16:09 +02:00
|
|
|
function! NvimGdbNoTKeymaps()
|
|
|
|
tnoremap <silent> <buffer> <esc> <c-\><c-n>
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
let g:nvimgdb_config_override = {
|
|
|
|
\ 'key_next': 'k',
|
|
|
|
\ 'key_step': 's',
|
|
|
|
\ 'key_finish': 'f',
|
|
|
|
\ 'key_continue': 'c',
|
|
|
|
\ 'key_until': 'u',
|
|
|
|
\ 'key_breakpoint': 'b',
|
|
|
|
\ 'set_tkeymaps': "NvimGdbNoTKeymaps",
|
|
|
|
\ }
|
2024-01-19 11:30:25 +01:00
|
|
|
]]
|
2023-04-08 23:47:10 +02:00
|
|
|
|
2022-12-31 17:43:31 +01:00
|
|
|
opt.termguicolors = true
|
2023-03-21 07:15:59 +01:00
|
|
|
opt.mouse = 'nv'
|
2023-12-04 09:24:43 +01:00
|
|
|
-- opt.fileencoding = 'utf-8'
|
2022-12-31 17:43:31 +01:00
|
|
|
opt.splitbelow = true
|
|
|
|
opt.splitright = true
|
|
|
|
opt.showmode = false
|
|
|
|
opt.undofile = true
|
|
|
|
opt.updatetime = 300
|
|
|
|
opt.backup = false
|
2023-12-04 09:24:43 +01:00
|
|
|
-- vim.api.nvim_set_option("clipboard","unnamed")
|
2023-07-02 22:17:37 +02:00
|
|
|
opt.clipboard:prepend { 'unnamedplus', 'unnamed' }
|
2023-06-19 11:33:42 +02:00
|
|
|
opt.ignorecase = true
|
2022-12-31 17:43:31 +01:00
|
|
|
opt.smartcase = true
|
|
|
|
opt.sessionoptions = 'folds'
|
2023-06-27 11:08:53 +02:00
|
|
|
opt.foldlevelstart = 1
|
2022-12-31 17:43:31 +01:00
|
|
|
opt.number = true
|
2023-01-19 17:06:14 +01:00
|
|
|
opt.shortmess:append('I', 'W', 's')
|
2022-12-31 17:43:31 +01:00
|
|
|
opt.iskeyword:prepend { '-' }
|
|
|
|
opt.timeoutlen = 300
|
2023-04-08 23:47:10 +02:00
|
|
|
opt.fillchars = 'eob: '
|
2023-07-02 22:17:37 +02:00
|
|
|
opt.cmdheight = 1
|
2023-04-20 14:50:06 +02:00
|
|
|
opt.grepprg = 'rg --vimgrep --no-heading --smart-case --hidden'
|
|
|
|
opt.grepformat = '%f:%l:%c:%m'
|
2023-12-04 09:24:43 +01:00
|
|
|
opt.cursorline = true
|
|
|
|
opt.cursorlineopt = 'number'
|
2024-01-19 11:30:25 +01:00
|
|
|
vim.opt.formatoptions:remove("c")
|
2022-12-31 17:43:31 +01:00
|
|
|
|
2023-04-08 23:47:10 +02:00
|
|
|
vim.api.nvim_create_user_command('Cd', 'lcd %:p:h', { nargs = 0 })
|
2023-06-21 17:00:59 +02:00
|
|
|
vim.api.nvim_create_user_command('Grep', 'silent grep! <args> | TroubleToggle quickfix', { nargs = '+' })
|