Linux command
lvim 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start LunarVim
lvim
Open a file
lvim [file.py]
Open file at specific line
lvim +[10] [file.py]
Update LunarVim
lvim +LvimUpdate +q
Open multiple files
lvim -p [file1.py] [file2.py]
Start in diff mode
lvim -d [file1.py] [file2.py]
Run headless
lvim --headless +'lua print("hello")' +q
说明
lvim (LunarVim) is a pre-configured Neovim distribution that provides an IDE-like experience out of the box. It includes curated plugins, keybindings, and sensible defaults while remaining fully customizable. LunarVim includes built-in support for LSP (Language Server Protocol), providing intelligent code completion, diagnostics, and refactoring. Treesitter provides advanced syntax highlighting and code navigation. The which-key plugin displays available keybindings contextually. Configuration is done via ~/.config/lvim/config.lua using Lua. The lvim global object exposes settings for plugins, keybindings, and editor options. Custom plugins can be added through the lvim.plugins table. Since LunarVim is built on Neovim, all Neovim command-line options are supported. The editor inherits Vim's modal editing paradigm with Normal, Insert, Visual, and Command-line modes.
参数
- +_num_
- Position cursor on specified line number.
- +/_pattern_
- Position cursor on first line matching pattern.
- -c _command_
- Execute command after loading file.
- -o_N_
- Open N windows split horizontally.
- -O_N_
- Open N windows split vertically.
- -p_N_
- Open N tab pages.
- -d
- Start in diff mode.
- -R
- Readonly mode.
- --headless
- Start without UI for scripting.
- --clean
- Start with minimal configuration.
- -u _config_
- Use alternate config file.
- -h, --help
- Display help information.
- -v, --version
- Show version information.
FAQ
What is the lvim command used for?
lvim (LunarVim) is a pre-configured Neovim distribution that provides an IDE-like experience out of the box. It includes curated plugins, keybindings, and sensible defaults while remaining fully customizable. LunarVim includes built-in support for LSP (Language Server Protocol), providing intelligent code completion, diagnostics, and refactoring. Treesitter provides advanced syntax highlighting and code navigation. The which-key plugin displays available keybindings contextually. Configuration is done via ~/.config/lvim/config.lua using Lua. The lvim global object exposes settings for plugins, keybindings, and editor options. Custom plugins can be added through the lvim.plugins table. Since LunarVim is built on Neovim, all Neovim command-line options are supported. The editor inherits Vim's modal editing paradigm with Normal, Insert, Visual, and Command-line modes.
How do I run a basic lvim example?
Run `lvim` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does +_num_ do in lvim?
Position cursor on specified line number.