Questions tagged [plugin-system]

For questions about Vim's plugin system. NOT for questions about a specific plugin (use the appropriate plugin-* tag) or questions that may require a plugin.

Filter by
Sorted by
Tagged with
7 votes
1 answer
4k views

In what order does vim read ftplugin files, syntax files, and the .vimrc when `filetype plugin on` and `set syntax=filetype` are called?

I've had some issues reconciling my .vimrc with files in ftplugin and after/ftplugin. In what order are they all read? For example: When vim encounters the line plugin filetype on in a .vimrc file, is ...
1 vote
1 answer
325 views

When to use "set exrc" and local '.vimrc' in Vim, and how to manage plugins with multiple 'vimrc' files for large projects?

I'm using Vim for a project that has a lot of pages per chapter, and Vim is a little bit slow. I want to create a local '.vimrc' file for this project with only the plugins I need, and I'm trying to ...
1 vote
2 answers
73 views

How to noremap plugin functions that take arguments?

I am aware that it is good practice to map some plugin function, like for example the piece of code that follows (Vim9): import autoload "../lib/my_script.vim" noremap <unique> <...
0 votes
1 answer
821 views

How do I set floatterm plugin in Neovim such that F5 compile javascript and how do I do it for other languages?

I plugged float-term plugin , that open terminal window in neovim. when I compile javascript with node in float term I did like :FloatermNew node % then it compiles fine and show me the output in ...
0 votes
1 answer
95 views

Hide the list of plugins show almost each time at a file open [closed]

When I open some file I see a list of plugins shown on the whole window (screenshot below). I get tired of wasting my time to press few keys to hide this list: several times Space each time. No error ...
0 votes
1 answer
1k views

How to include/configure lua_ls on lspconfig?

I am trying to include lua_ls on my lspconfig but I am getting this error [lspconfig] Cannot access configuration for lua_ls. Ensure this server is listed in `server_configurations.md` or added as a ...
1 vote
1 answer
34 views

Getting an error message when triggering plugin load with vim-plug

I'm new to the world of plugins, and have just installed vim-plug (well, sort of). My .vimrc has: call plug#begin() Plug 'vim-airline/vim-airline', { 'on': 'Airline' } call plug#end() ... since I ...
0 votes
4 answers
82 views

Check if a script is sourced

I use quite a number of plugins now and the init.vim script for nvim has become quite unwieldy. So I started separating out the individual configuration files for each individual plugin. And now I ...
21 votes
2 answers
4k views

How to patch add in Fugitive plugin?

This screen I got after running the :Gstatus command: Then I moved the cursor to init.vim file and pressed the p key, i.e. run git add –patch for the current file. Now I have this screen: As you can ...
0 votes
1 answer
40 views

My plugin got sourced first before init.lua

I make a colorscheme plugin with vimscript (the code sucks, as I've never write a plugin before), there it checks if a global var exist or not. " nvim-colors/colors/kalm.vim ... if !exists('g:...
1 vote
1 answer
29 views

How to use tmap with <Plug>?

I am wondering how shall I use tmap along with <Plug>. Here is a snippet of the context where I am using it: vim9script import autoload "../lib/foo.vim" noremap <unique> <...
11 votes
3 answers
3k views

Setting syntax in ftplugin

I’m trying to set the syntax of Processing files (*.pde) to java with a ftplugin. .vim/ after/ ftdetect/ pde.vim ftplugin/ processing.vim In after/ftdetect/pde.vim I ...
0 votes
0 answers
468 views

I get several deprecation warnings printed, how to disable them?

I see this when I open first file in nvim. I have not much to do with these (those are plugins that I didn't write). How can I disable them being printed to console? sumneko_lua is deprecated, use ...
5 votes
2 answers
2k views

Easiest way to insert LaTeX matrix?

Recently I found myself in a situation that need to type in quite a number of matrices to LaTeX by hand, so I was wondering if there are some tools that can help me to save some keystrokes. The ...
0 votes
0 answers
60 views

Plugin function scope issue

I have recently discovered this guide that was very eye opener under many aspects. So I decided to do things "by the book" by moving my plugins in ~/.vim/pack/bundle/start/myplugin/plugin/...
1 vote
0 answers
54 views

bufexplorer.vim plugin doesn't load

I installed ubuntu-20.04.3-desktop-amd64.iso on VirtualBox 6.1.28. It is my first foray into virtual machines and Linux. I installed Vim 8.1 according to this page. The :scriptnames command shows ...
23 votes
6 answers
14k views

Settings and plugins when root (`sudo vim`)?

It's really frustrating when I need to edit a file as root and use sudo vim somefile.conf and I can't use any of my keybindings and settings and plugins. Is there a way to get all my customizations ...
2 votes
1 answer
5k views

How to install LunarVim on Windows?

I am installing LunarVim on Windows using the official docs available at: https://www.lunarvim.org/docs/installation I run: bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/...
0 votes
1 answer
256 views

How to set the ALE configuration `g:ale_exclude_highlights`?

I use ALE to check coding style, but I want to ignore the warning type:line too long, like this picture: And I find the related setting g:ale_exclude_highlights, this is its explanation in :help ale :...
1 vote
1 answer
29 views

Does `.rc` do anything in `after/plugin/foo.rc.vim`?

I see some people add a .rc. extention to files in after/plugin, is there any difference between: after/plugin/foo.vim after/plugin/foo.rc.vim ? Or: after/plugin/bar.lua after/plugin/bar.rc.lua ?
0 votes
1 answer
17 views

Why does the help suggest to end the lhs of a plug mapping with a semicolon?

In :help using-<Plug> a suggestion is given as to how to name the left hand side of a <Plug> mapping: To make it very unlikely that other plugins use the same sequence of characters, use ...
1 vote
2 answers
117 views

How do I let the user of my plugin customize a custom highlight group I define?

In this plugin for (soft-)wrapping only the current line, I have defined a highlight group, au ColorScheme * hi SoftWrapHighlightGroup ctermbg=NONE ctermfg=NONE, which I use here as an argument to a ...
0 votes
2 answers
95 views

How can I check whether the user has defined a highlight group before Vim 8.2.3917

With this question I've learned of the existence of hlget and hlID, which I use in a plugin of mine like this: if empty(hlget('SoftWrapHighlightGroup')) " do stuff endif However, those ...
2 votes
1 answer
516 views

Is there a way to disable custom mappings while plugin functions are being executed in vim?

In my vimrc file, I use the following few lines to swap backtick and single-quote for convenience when I'm using marks: for first in ['', 'g', '[', ']'] for mode in ['n', 'x', 'o'] exe ...
1 vote
1 answer
71 views

Remove all leader mappings before creating my own

The question pretty much sums it up: Is there a way to clear all of the <leader> mappings set by plugin authors before proceeding to set my own custom mappings? The only way I've seen to do this ...
8 votes
2 answers
2k views

How to design a command in a plugin that can be called from vimrc?

I'm working on a plugin that allows users to create custom operators. The operators would apply a VimL expression to the motion or text object that the operator moves over. Keeping a clean user ...
152 votes
4 answers
52k views

What is the Vim8 package feature and how should I use it?

Vim 8 was released today and the release notes mentions a new "package" feature. What is it and how should I use it? Most importantly, does it replace the good old plugin managers?
1 vote
1 answer
674 views

Aligning variables and comments in vim

I've looked for this since a long time but I can't seem to find anything relating to this. It could be because of my poor searching skills. Whenever the code starts getting long, its obvious that we ...
0 votes
1 answer
523 views

How can I install fzf in vim without using a plugin manager? [duplicate]

I have fzf installed in manjaro (/usr/bin/fzf, /usr/share/fzf), but I can't seems to figure out how to install fzf for vim. I'm having trouble following these instructions: https://github.com/junegunn/...
1 vote
2 answers
114 views

Open buffer without loading ftplugins

I have huge file and quite slow plugin (loaded by vim-plug) for corresponding filetype. I want following: Plugin is loaded by default Option to fast open this file without loading plugin. Something ...
2 votes
1 answer
146 views

How does Vim execute a plugin?

What is the plugin system ? I could not find answers how the plugins are actually loaded/executed in Vim. I know that Vim looks for them in specific locations. I also found this question about what an ...
15 votes
2 answers
2k views

Detect most resource hungry plugin

I have some plugins installed for vim, I would like to know how can I find out what plugin uses most resources (CPU, RAM) ?
5 votes
0 answers
212 views

Issue when moving Vim9script plugin's functions to autoload

I've read :help write-plugin to understand a bit more about how to write a plugin in Vim9script, but there aspects of that that puzzle me. Here's a very simplified, working version of the example ...
12 votes
2 answers
3k views

vim hangs when I open a typescript file

I have a vim 8.2 on a Gentoo Linux running on a more or less 8 years old PC. I almost never have a performance issue with vim, unless you open a one-line huge xml oder json file, but those are vary ...
31 votes
3 answers
10k views

How can I redefine plugin key mappings?

I have installed a plugin that doesn't provide a mechanism to disable the key mappings it defines. I want to redefine one of the mappings (<leader>cc) defined by the plugin for my own pursope, I'...
0 votes
0 answers
22 views

Plug-in to create comment layer

Is there any plug-in where you can write text without being in insert mode but it’s not being written to the actual file? If you enter insert mode, all that comment text disappears. It should be in a ...
0 votes
0 answers
180 views

How portable is my $HOME/.vim directory?

I'm at home on a few unixy systems, FreeBSD/amd64, Linux/amd64 and Solaris/Sparc. I would like my ~/.vim directory as portable as possible, ideally in such a way I can keep them identical (say, rsync ...
0 votes
1 answer
51 views

If I change the name of my plugin, will it cause issues for existing users?

I've recently released vim-surround-funk, which was inspired by tpope's vim-surround. Originally, I was calling it surround-funk.vim, but I changed the name to be more consistent with vim-surround's ...
1 vote
1 answer
53 views

Prevent plugins from loading if python not found

I'm working on a server that has various different python installations set up. At any one time, only one will be accessable and working, depending on what I am working on. Some are python2, some ...
1 vote
1 answer
3k views

Where are neovim's cached, file-specific settings?

Vim has a ~/.vim/view/ directory for storing file-specific settings, such as saved cursor position and any command manually ran while viewing a file. Sometime, when I would update and source my vimrc, ...
1 vote
1 answer
717 views

Vimscript - Loading function(s) from another .vim file

I'm forking an old vim plugin (effectively dead since 2018) that needed some love. Once I got to the .vim file, I noticed that the functions were all defined in there, which made the file unreasonably ...
0 votes
1 answer
167 views

Vim Inside Docker Container Doesn't Recognise Plugins via Vim 8's Own Plugin System

I'm trying to move my development environment into a Docker container to better manage my dependencies. Hence, I need Vim inside that container as well: git clone https://github.com/vim/vim.git &&...
2 votes
1 answer
2k views

Vim plugin installation saying that I have to check my access rights

I'm using a plugin manager Vim Plug and I'm trying to install YouCompleteMe but I keep on getting this error and I don't know what to do with this. I use VIm8 x YouCompleteMe: Cloning into '/home/...
2 votes
3 answers
1k views

Unable to Open NERDTree

I'm new to Vim, and for the paste couple of weeks, I've been using NERDTree with no problems. However, I recently added a few key mappings and am now unable to open NERDTree with the <C-n> ...
0 votes
2 answers
178 views

project-based config: how to load plugins/colors from custom subdir of $PWD when doing `vim -u local/vimrc ...`?

The Need, the Goal... By "project-based config" I mean a project contained in a git repo that contains all the vim configuration -- vimrc and plugins and colorschemes -- right there in the ...
0 votes
3 answers
2k views

Sourcing Vimplug plugins in a separate file

Installing plugins through vim-plug involves putting the following code inside the vimrc file. call plug#begin('~/.vim/plugged') Plug 'user/repository' call plug#end() I install a lot of plugins, ...
0 votes
1 answer
591 views

Should the filetypedetect augroup be used in plugins?

I'm writing my first Vim/Neovim plugin, which improves support for files managed by yadm. Pretty straightforward. However, while reading other plugins for inspiration, I have noticed that plugin ...
0 votes
2 answers
177 views

cryptic error since Big Sur upgrade, :PlugInstall doesn't work, and none of my plugins work

Error: Error detected while processing BufWinEnter Autocommands for "*"..function <SNR>3_LocalVimRC[322]..BufWinEnter Autocommands for "*"..function <SNR>3_LocalVimRC: ...
0 votes
0 answers
34 views

Creating vimrc kills my plugin

I have the following ~/.vim/filetype.vim: augroup filetypedetect au BufRead,BufNewFile *?Script.sml let maplocalleader = "h" | source /home/gergely/HOL/tools/vim/hol.vim " recognise ...
1 vote
0 answers
45 views

Measurement/ tracking the time for editing a file (overall and statistics)

I use vim for coding and also for writing scientific articles and book chapters. It would be very interesting to know the time I spent on a file. For example how many hours or minutes the buffer was ...

1
2 3 4 5