vim
Core Neovim navigation and editing skills
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Neovim Core API Reference
This document covers the essential Neovim Lua APIs for automation and configuration.
vim.api
The main interface for calling Neovim's internal C functions.
-- Buffer operations
vim.api.nvim_get_current_buf()
vim.api.nvim_buf_get_lines(bufnr, start, end_, strict)
vim.api.nvim_buf_set_lines(bufnr, start, end_, strict, lines)
-- Window operations
vim.api.nvim_get_current_win()
vim.api.nvim_win_get_cursor(win)
vim.api.nvim_win_set_cursor(win, {row, col})
-- Keymaps & Commands
vim.api.nvim_set_keymap(mode, lhs, rhs, opts)
vim.api.nvim_create_user_command(name, command, opts)
vim.api.nvim_create_autocmd(event, opts)
vim.api.nvim_create_augroup(name, opts)
vim.fn
Access to legacy Vimscript functions.
vim.fn.expand("%:p") -- Get current file absolute path
vim.fn.line(".") -- Get current line number
vim.fn.stdpath("config") -- Get config directory path
vim.fn.jobstart(cmd, opts) -- Start an asynchronous job
khulnasoft Custom Utilities
Git Automation (<leader>gc)
Your configuration includes a custom dev_commit utility that:
- Runs
git add . - Commits with a timestamped message.
- Pushes to origin asynchronously.
Reloading (R)
Use the global R(module_name) function to reload Lua modules without restarting Neovim.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!