Skip to content

Vim

My LunarVim Configuration

lvim.plugins = {
    { "folke/trouble.nvim",  opts = {}, cmd = "Trouble" }
}

lvim.builtin.which_key.mappings["t"] = {
    name = "Diagnostics",
    t = { "<cmd>Trouble diagnostics toggle<cr>", "trouble" }
}

lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
lvim.keys.term_mode["<esc>"] = "<C-\\><C-n>" -- Exit from insert mode by Esc in Terminal

vim.opt.wrap = true
vim.opt.clipboard = "unnamedplus"
vim.opt.spell = false
vim.opt.spelllang = "en,cjk"
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
vim.opt.expandtab = true -- convert tabs to spaces

LunarVim Operations

File Management

  • Close current buffer: Space C
  • Toggle on/off file explorer: Space E
  • Switch to previous tab: Shift+H
  • Switch to next tab: Shift+L
  • Switch to file explorer: Ctrl+H
  • Switch to editor: Ctrl+L

Language Support

  • Go to definition: G D
  • Jump back: Ctrl+O
  • Open error message: Space T T
  • Rename a variable: Space L R

Terminal

  • Toggle on/off terminal: Ctrl+\