This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/nvim/after/ftplugin/tex.lua
2021-11-20 16:05:46 +01:00

32 lines
730 B
Lua

-- Author : swytch
-- Created : Monday Oct. 04, 2021 16:09:13 CET
-- License : GPLv3
-- Description : tex filetype config
local opt = vim.opt
local g = vim.g
opt.formatoptions = "trq1jp"
opt.tabstop = 4
-- Caps
utils.map("i", "AA", "À")
utils.map("i", "CC", "Ç")
utils.map("i", "EE", "É")
-- Unbreakable spaces
utils.map("i", "<Space>etc", "\\,etc.")
utils.map("i", "<Space>:", "\\,:")
-- Centered point
utils.map("i", ";.", "\\textperiodcentered")
-- Italics
utils.map("i", "II", "\\textit{}<Esc>i")
-- Bold
utils.map("i", "BB", "\\textbf{}<Esc>i")
-- Bold + Italics
utils.map("i", "BI", "\\textit{\\textbf{}}<Esc>hi")
-- Smallcaps
utils.map("i", "SC", "\\fsc{}<Esc>i")