Companies Home Search Profile

How to Write Neovim Plugin from Scratch

Focused View

Yuki Yoshimine

45:19

104 View
  • 1.1 init.zip
  • 1.2 init.zip
  • 1. Setup.mp4
    02:11
  • 1. What is a runtimepath.mp4
    01:59
  • 2. runtime command.mp4
    04:18
  • 3. runtime command and plugin dir.mp4
    02:35
  • 1. How to install Vim Plugins without Plugin Manager.mp4
    03:26
  • 2. pack start directory.mp4
    04:10
  • 3. pack opt directory.mp4
    03:56
  • 1. What does require do.mp4
    02:52
  • 2. What does require return.mp4
    00:54
  • 3. Which module does it return.mp4
    00:29
  • 1. confy.mp4
    01:50
  • 2. user customization.mp4
    01:31
  • 3. reloading Lua modules.mp4
    03:22
  • 4. Ideas for further exploration.mp4
    02:41
  • 5. Publish!.mp4
    03:02
  • 1. defaults in plugin directory.mp4
    03:09
  • 2. user customization using global variable.mp4
    02:07
  • 3. plugin directory in the popular Lua Plugins.mp4
    00:47
  • Description


    Neovim Plugin Development

    What You'll Learn?


    • Understand runtimepath
    • Learn how to install plugins without plugin manager
    • Create a very minimal plugin called "confy"
    • Publish your shiny new plugin!

    Who is this for?


  • Beginner Neovim user curious about Neovim Plugin Development
  • What You Need to Know?


  • Basics knowledge of Vim
  • More details


    Description

    What you will learn?

    Basics

    • What is runtime path?

    • Relationship between Vim Plugins and Runtime Path

    • How to install Plugins without "Plugin Manager"?

    • Difference between pack/start and pack/opt

    • What does "require" do?

    • Module reloading without closing Neovim.

    Plugin No.1 [ confy.lua ]

    • writing up confy from scratch

    • simple plugin to open and reload your init.vim or init.lua

    • this should get you started on basic plugin structure

    • and finallay publishing it so that others can use your shiny new plugin!


    Plugin No.2 [ Wrap Console Log ]

    • writing up wrapper from scratch

    • port of VSCode extension Wrap Console Log

    • it wraps the word under the cursor into a template


    My future courses?

    • auto pair

    • splitjoin

    • key chain

    • key layer

    • zettelkasten link jumper

    • real-time floating window logger

    • smooth 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.

    Who this course is for:

    • Beginner Neovim user curious about Neovim Plugin Development

    User Reviews
    Rating
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category
    Yuki Yoshimine
    Yuki Yoshimine
    Instructor's Courses
    I have started using Vim and Neovim while I was a student learning different programming languages. Along the way I started documenting what I was learning and that became my YouTube channel. I have also made a number of plugins for my own personal use over the years. Hoping to teach others what I have learned and making the process easier for others.
    Students take courses primarily to improve job-related skills.Some courses generate credit toward technical certification. Udemy has made a special effort to attract corporate trainers seeking to create coursework for employees of their company.
    • language english
    • Training sessions 18
    • duration 45:19
    • Release Date 2023/06/17