Skip to main content

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
0 votes
0 answers
50 views

Write a temporary one-liner to the bottom line after opening a file?

When opening a file whose filetype extension is governed by ftdetect, i wish to write a single-line to the vim status bar (bottom line) that says something like: To enable syntax highlighting for this ...
John Greene's user avatar
1 vote
2 answers
26 views

Make my edit session turn off highlighting if on a black and white (BW or B/W) terminal

I wish to turn off syntax highlightings, only for terminal session having a black-and-white (BW, B/W) terminal. And only for that particular plugin whose syntax vimscript is CPU-intensive which I am a ...
John Greene's user avatar
0 votes
1 answer
14 views

What would a template header look like for use in a vimscript file (found in `$HOME/.vimrc`, et. al.)

What would a template look like for the header portion of a vimscript file that is commonly found in a plugin, or files found under Vi/Vim configuration (i.e., $HOME/.vimrc directory?
John Greene's user avatar
1 vote
1 answer
102 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 ...
Moraes's user avatar
  • 115
0 votes
1 answer
20 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 ...
Moraes's user avatar
  • 115
2 votes
2 answers
136 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. ...
Enlico's user avatar
  • 2,276
1 vote
0 answers
27 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 ...
Enlico's user avatar
  • 2,276
3 votes
1 answer
702 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&...
myc3lium's user avatar
0 votes
1 answer
130 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 ...
intuited's user avatar
  • 329
1 vote
0 answers
109 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 = [] ...
shotinleg's user avatar
1 vote
0 answers
761 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 ...
purplelulu's user avatar
1 vote
0 answers
85 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 ...
intuited's user avatar
  • 329
0 votes
1 answer
104 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 ...
user avatar
18 votes
2 answers
4k 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 ...
statox's user avatar
  • 50.6k