How to Write Neovim Plugin from Scratch

所在平台: Udemy

课程主页: https://www.udemy.com/course/neovim-plugin-from-scratch-introduction-course/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:从零开始编写 Neovim 插件 课程概述: 本课程旨在教授如何为流行的文本编辑器 Neovim 开发插件。作为 Vim 编辑器的分支,Neovim 提供了若干新功能和增强特性。课程开始时将介绍 Vim 的一些基本内部知识,特别是“运行路径”。运行路径是 Vim 查找运行时文件(如语法高亮文件、插件脚本和文档)的目录列表,这些目录通常存储在 'runtimepath' 选项中,形成以逗号分隔的路径列表。理解运行路径对于插件的安装和使用至关重要。 课程内容包括: 1. 基础知识 - 什么是运行路径? - Vim 插件与运行路径的关系 - 如何在没有“插件管理器”的情况下安装插件? - pack/start 与 pack/opt 的区别 - “require” 的功能 - 模块在不关闭 Neovim 的情况下的重新加载 2. 插件开发 - 插件一:[confy.lua] - 从零开始编写 confy - 一个简单的插件,用于打开和重新加载 init.vim 或 init.lua - 这个插件将帮助你理解基本的插件结构,并最终将其发布,供他人使用。 - 插件二:[Wrap Console Log] - 从零开始编写一个包装器 - VSCode 扩展 Wrap Console Log 的移植 - 它将光标下的单词包裹到一个模板中 3. 未来的课程内容概述 - 自动配对、分屏、键链、键层、Zettelkasten 连接跳转、实时浮动窗口记录、平滑滚动等。 - 其他项目(可在 GitHub 上找到):IDE 退格、光标闪烁器、n 闪烁器、星星闪烁器、Vimscript 虚拟文本回显等。 通过本课程,学员将掌握 Neovim 插件开发的基本原理并能够创建自己的 Neovim 插件。

课程评论(0条)

课程详情

What you will learn?BasicsWhat is runtime path?Relationship between Vim Plugins and Runtime PathHow to install Plugins without "Plugin Manager"?Difference between pack/start and pack/optWhat does "require" do?Module reloading without closing Neovim.Plugin No.1 [ confy.lua ]writing up confy from scratchsimple plugin to open and reload your init.vim or init.luathis should get you started on basic plugin structureand finallay publishing it so that others can use your shiny new plugin!Plugin No.2 [ Wrap Console Log ]writing up wrapper from scratchport of VSCode extension Wrap Console Logit wraps the word under the cursor into a templateMy future courses?auto pairsplitjoinkey chainkey layerzettelkasten link jumperreal-time floating window loggersmooth scroller ( on github )IDE backspace ( on github )cursor flasher ( on github )n flasher ( on github )star flasher ( on github )vimscript virtual text echo ( probably could extend to other languages )and if you are adventurous.your own fuzzy finder! Boooooom! ?An introductory course on Neovim plugin development would cover the basics of creating plugins for the popular text editor, Neovim. Neovim is a fork of the Vim text editor and offers several new features and enhancements. The course would begin with an overview of some internal understanding of Vim, runtime path in particular."runtime path" is the list of directories where Vim looks for its runtime files, such as syntax highlighting files, plugin scripts, and documentation. These directories are typically stored in the 'runtimepath' option, which is a comma-separated list of directory paths.The runtime path is important because it determines where Vim looks for its runtime files when it starts up. If a user installs a new plugin, for example, they may need to add the plugin's directory to the runtime path so that Vim can find the plugin's script files.After doing some experimentation with runtime path, we look at how vim handles installation of plugins before and after the introduction of package feature in Vim8. We also try installing the plugins without plugin managers.Then we see how Lua module fit into the picture and how they are loaded using the "require" function. Finally we create a very minimal plugin called confy!First by following the Lua Plugin convention using the setup function.Second by following the Vimscript convention using plugin directory and vim global variables.By the end of the course, students should be able to create their own Neovim plugins and understand the fundamentals of Neovim plugin development.

课程标签

0人关注该课程

主题相关的课程