{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} if (vim.g.neovide) then vim.g.neovide_scale_factor = 0.7 vim.g.neovide_cursor_animation_length = 0 end {{- end }} vim.cmd([[ try if exists('+termguicolors') set termguicolors endif colorscheme yah catch colorscheme desert endtry ]]) vim.g.mapleader = " " vim.opt.incsearch = true vim.opt.ignorecase = true vim.opt.smartcase = true vim.cmd(":filetype plugin indent on") vim.cmd(":syntax enable") vim.opt.backspace = "indent,eol,start" vim.opt.smarttab = true vim.opt.ruler = true vim.opt.wildmenu = true vim.opt.gdefault = true vim.opt.autoread = true vim.opt.history = 1000 vim.opt.encoding = "utf-8" vim.opt.number = true vim.opt.relativenumber = true vim.opt.laststatus = 2 vim.opt.showcmd = true vim.opt.showmatch = true vim.opt.cmdheight = 3 vim.opt.list = true vim.opt.listchars = "tab:>>,trail:_,eol:$,multispace:ยทยท,extends:>,precedes:<,nbsp:%" vim.opt.encoding = "utf-8" vim.opt.fenc = "utf-8" {{- if eq .chezmoi.username "root" }} vim.opt.expandtab = false {{- else }} vim.opt.expandtab = true {{- end }} vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 -- abbreviations vim.cmd(":ca cd. lcd %:p:h") vim.cmd(':ca mkdir. call mkdir(expand("%:p:h"), "p")') {{- if ne .chezmoi.username "root" }} vim.cmd(':ca W! w !sudo -A tee %') {{- end }} {{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} vim.cmd([[ autocmd InsertLeave * call system("fcitx5-remote -c") ]]) {{- end }} vim.cmd("set clipboard+=unnamedplus")