-- CORE SETTINGS local o = vim.o local global = vim.g local map = vim.keymap.set -- look and feel global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl" o.number = true o.relativenumber = true o.ruler = true o.scrolloff = 10 o.showmode = false o.spell = true -- controlling global.mapleader = ' ' o.autoindent = true o.ignorecase = true o.smartcase = true o.smartindent = true vim.opt.completeopt = { 'menu', 'menuone', 'noselect' } -- vscode if vim.g.vscode then -- undo/REDO via vscode map("n", "u", "call VSCodeNotify('undo')") map("n", "", "call VSCodeNotify('redo')") map("n", "gf", "call VSCodeCall('editor.action.openLink')", { noremap = true }) end -- generic mappings map('v', '<', '', '>gv', { noremap = true }) map('n', 'Y', 'y$', { noremap = true }) map('n', 'n', 'nzzzv', { noremap = true }) map('n', 'N', 'Nzzzv', { noremap = true }) -- Shortcutting split navigation map('', '', 'h') map('', '', 'j') map('', '', 'k') map('', '', 'l') map('', '', 'H') map('', '', 'J') map('', '', 'K') map('', '', 'L') map('', '', '>') map('', '', '<') map('', '', '+') map('', '', '-') map('', '', 'T') -- undo to the last , . or ! map('i', ',', ',u', { noremap = true }) map('i', '.', '.u', { noremap = true }) map('i', '!', '!u', { noremap = true }) map('i', '?', '?u', { noremap = true })