Neovim configs for 2023. Hopefully they last.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
586 B

2 years ago
  1. local function map(mode, lhs, rhs, opts)
  2. local options = { noremap = true }
  3. if opts then
  4. options = vim.tbl_extend("force", options, opts)
  5. end
  6. vim.api.nvim_set_keymap(mode, lhs, rhs, options)
  7. end
  8. vim.g.mapleader = " "
  9. map("n", "j", "gj")
  10. map("n", "k", "gk")
  11. map("n", "<C-h>", "<C-w>h")
  12. map("n", "<C-j>", "<C-w>j")
  13. map("n", "<C-k>", "<C-w>k")
  14. map("n", "<C-l>", "<C-w>l")
  15. map("i", "<A-a>", "ā")
  16. map("i", "<A-e>", "ē")
  17. map("i", "<A-i>", "ī")
  18. map("i", "<A-o>", "ō")
  19. map("i", "<A-u>", "ū")
  20. map("n", "<F12>", ":w|:!texbld run compile")
  21. map("n", "<F5>", ":w|:!./test.sh")