Questions tagged [plugin-development]

Questions about the development of plugins for Vim. *Do not* use this tag for questions about a specific plugin.

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

bind/map a call to win_gotoid with script level argument

I'm trying to set a nmap bind to make the focus change from Window B back to Window A. Both Window IDs are store at the script level: s:win_id_a and s:win_id_b. The current snippet I've is the ...
0 votes
1 answer
17 views

Plugin Dev - Keeping Track of Windows inside a single Tab

I'm trying to build a new plugin and I got myself a question about managing multiple windows inside a single tab (hope the terms are correct). So far the examples and projects I've explored trying to ...
2 votes
2 answers
106 views

How can I test the script-local functions of my plugin?

I have the feeling that the answer is you can't, but I'd like to be sure about it. My plugin has some s:function-name functions, and one plugin-name#function-name function that uses the former ones. ...
  • 1,910
1 vote
0 answers
17 views

Vader for testing plugin that eases window navigation

Some time ago I wrote a plugin for easy window navigation, and now I was trying to write some test for it, using Vader, which I knew nothing about until a few hours ago. Basically, with my plugin ...
  • 1,910
3 votes
1 answer
498 views

Vim feedkeys in operator pending mode

I'm trying to build a very simple plugin that allows for pressing a keymapping <Leader>, to call a function that prompts for a single keypress: function! ControlKey() echo "Key → <C-Key&...
0 votes
1 answer
114 views

Best way to avoid clobbering other vim plugins with global commands

I'm developing a vim plugin. There will be some global-level functionality that's not specific to a particular filetype. Is there some kind of registry of commands being used by vim packages? How ...
  • 319
1 vote
0 answers
85 views

Live search in temporary buffer

Faced a problem that I cannot force the buffer with results and the input field to work together, but not in turn (like in CtrlP) function! s:SearchByListFiles(all_files, query) let searched = [] ...
1 vote
0 answers
358 views

Subscribe to a buffer event in a lua plugin

I want to write a plugin that will watch a buffer for changes and execute different functions depending on the change. I know I can use nvim_buf_attach() to subscribe to buffer events, but they are ...
1 vote
0 answers
84 views

Vim package development python support for 2, 3, or both?

Apparently there are some issues preventing vim from being built with both python and python3 support under many linux distributions and OSX. This makes it difficult or impossible for many users to ...
  • 319
0 votes
1 answer
99 views

Generate non editable glyphs/adornments on top of text in Vim?

Visual Studio has a feature for C# that displays how many times a given method has been referenced. This information is displayed as tiny greyed out text above the method names. It is not possible to ...
16 votes
2 answers
3k views

How to save and restore a mapping?

I am developing a plugin for Vim and I would like to define a mapping which would be available only while the "execution of the plugin". So far the (simplified) workflow of the plugin is the ...
  • 47.3k