local o = vim.opt local map = vim.api.nvim_set_keymap vim.g.mapleader = "," vim.g.maplocalleader = "," o.modeline = true o.number = true o.relativenumber = true o.clipboard = "unnamedplus" o.viminfo = "" -- why viminfo not work o.expandtab = true o.tabstop = 4 o.shiftwidth = 0 o.viminfo = '' vim.g.base16colorspace = 256 vim.g.vimtex_view_method = "zathura" o.termguicolors = true vim.cmd [[ augroup spellcheck au! au FileType markdown setlocal spell au FileType plaintex setlocal spell au FileType tex setlocal spell au FileType latex setlocal spell au BufRead,BufNewFile *.md setlocal spell au BufRead,BufNewFile *.tex setlocal spell augroup END ]] o.spelllang = "en_us" map('i', '', 'u[s1z=`]au', { noremap = true }) vim.cmd('colorscheme theme-nvim') vim.g.airline_theme = 'theme' local color = require('base16-colorscheme').colors.base02 vim.api.nvim_set_hl(0, 'LineNr', { fg = color, bg = "none" }) map('n', 's', ':%s//g', {}) map('n', 'e', ':make!', { noremap = true }) map('n', '', ':cclose', { noremap = true }) map('n', '', ':nohlsearch', { noremap = true, silent = true }) map('n', ';', ':', { noremap = true }) map('v', ';', ':', { noremap = true }) for i = 1, 9, 1 do map('', '' .. tostring(i), tostring(i) .. 'gt', { noremap = true }) end map('n', '', ':tabprevious', { noremap = true }) map('n', '', ':tabnext', { noremap = true }) map('', '0', ':tablast', { noremap = true }) map('n', 'ZX', 'q', { noremap = true, silent = true }) map('t', '', '', { noremap = true }) o.list = true o.listchars = { tab = '▸ ', eol = '¬', trail = '·', extends = '›' } vim.cmd [[ augroup options_guicursor au! " Reset to vertical cursor for terminal nvim (https://github.com/neovim/neovim/issues/4867#issuecomment-291249173) au VimLeave * set guicursor=a:ver90 augroup END ]]