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
0 votes
3 answers
2k views

Vim 8 on Windows doesn't see plugins directory

I am using Vim 8.1 on Windows 10 and with a default package manager Vim doesn't see plugins in C:\Program Files (x86)\Vim\vimfiles\pack directory. Did I put in into incorrect place? EDIT: It is the ...
Alex's user avatar
  • 337
1 vote
0 answers
71 views

How to write to a temproary buffer in a plugin

I've started to write my first vim plugin, a simple timer. I want to be able to set a timer for an arbitrary amount of time, and have it notify me once that time has passed. I've got it all working, ...
Elias Van Ootegem's user avatar
0 votes
1 answer
128 views

Why does autoload/myplugin.vim get sourced?

I noticed that when functions in plugin/myplugin.vim are named using the autoload convention, function! myplugin#myfunction(), the file autoload/myplugin.vim gets sourced on vim startup, even though ...
Rastapopoulos's user avatar
1 vote
1 answer
187 views

The difference between a plugin script and a sourced script

First, apologies for attempting to ask a complicated question since I would not be able to provide a lot of details, however, one might catch something that I am missing. I have a vim script, that is ...
mbilyanov's user avatar
  • 687
1 vote
1 answer
194 views

What is the configuration equivalent to `gg`?

call feedkeys('gg', 'int') seems to work, but what would be the Vim configuration language equivalent?
l0b0's user avatar
  • 121
5 votes
2 answers
1k 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 ...
hzh's user avatar
  • 195
1 vote
1 answer
322 views

Syntax folder under plugin/foo/syntax/foo.vim not automatically applied when filetype change?

I have a plugin under nvim/plugin/foo, but the syntax file nvim/plugin/foo/syntax/foo.vim is not automatically applied when the filetype change, but if I put it under nvim/syntax/foo.vim it works I'...
tga's user avatar
  • 409
3 votes
1 answer
710 views

Can't echo messages from inside async functions

CASE 1: Have your autocmd command be setup like this: autocmd User ALELintPost call SayHello() " ALELintPost is async And your SayHello function set up like this function! SayHello() abort ...
resolritter's user avatar
1 vote
1 answer
300 views

Dein options to only load plugin if dependent program found

I'm trying to set up Dein to load the gen_tags plugin. However, if Universal/Exuberant Ctags or GNU Global aren't found on the path, I get the following error message when trying to start nvim: ...
embedded.kyle's user avatar
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 ...
smeikx's user avatar
  • 113
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> ...
Mohideen Imran Khan's user avatar
5 votes
2 answers
409 views

Why vim plugins have a check on &cp

I'm trying to wrap my head around vim plugin development and I see a constant check on a variable to see if the plugin has already been loaded like: if exists('g:loaded_plugin') || &cp finish ...
Stoic Alchemist's user avatar
0 votes
1 answer
738 views

How to load a "local" plugin with Minpac properly?

After moving from Vim-plug to Minpac, the only missing functionality has been to be able to load local paths. Actually I managed to make it work (details below), but I've got the feeling that there ...
lsrdg's user avatar
  • 450
0 votes
2 answers
115 views

Unable to detect filetype which is set forcefully inside a custom plugin

I have following line in my vimrc- autocmd BufRead,BufNewFile *.COB,*.PCO set filetype=cobol "force filetype as cobol for .COB and .PCO files And I have put below lines in my custom plugin at the ...
Ankit Jain's user avatar
3 votes
1 answer
2k views

Call vim command from shell, and suppress output while it operates

I'm setting up a vim environment install script. I'm using vim-plug for plugin management. What I'd like to do is, from the install.sh, run vim and call PlugInstall to trigger plugin download and ...
silico-biomancer's user avatar
1 vote
2 answers
448 views

Why do plugins check v:version < 700?

I see this guard clause at the top of a lot of plugins, if exists("g:loaded_thisplugin") || v:version < 700 || &cp finish endif let g:loaded_thisplugin = 1 Is there something specific about ...
ivan's user avatar
  • 1,420
1 vote
0 answers
128 views

how to set a watch in the vim debugger

I use DBGp Remote Debugger Interface for debuggign in vim. which works excellent, but it's missing some things that I would like to have: a watch variable features (most important) auto complete when ...
abbood's user avatar
  • 603
1 vote
2 answers
612 views

Vim stops treating "<Plug>" as a keyword to call functions in insert mode

I have the following configuration in my vimrc file. inoremap <C-A> <Plug>InsertComment And somewhere in my vim folder I defined inoremap <silent> <Plug>InsertComment <...
hzh's user avatar
  • 195
1 vote
1 answer
335 views

Is there a way to lock a buffer from changing?

I have NERDTree open all the time and sometimes I forget I have my cursor in there and I try to switch my main window to another buffer and it switched the NERDTree one, which get super annoying after ...
Joff's user avatar
  • 165
2 votes
1 answer
971 views

Why does `vim-plug` add the .vim file to .vim/autoload and not .vim/plugin?

I am new to Vim plugins and am looking to use the vim-plug plugin manager. The installation instruction advises me to download the .vim file and add it to ~/.vim/autoload. curl -fLo ~/.vim/autoload/...
dayuloli's user avatar
  • 121
0 votes
2 answers
820 views

Looking for a good Database Visualization Tool [duplicate]

I'm jealous of my co-workers using phpstorm etc to visualize the db schema etc.. I was wondering if there was a solution for that on vim? I googled around and found this https://github.com/vim-scripts/...
abbood's user avatar
  • 603
3 votes
3 answers
4k views

Call function only when the plugin is loaded

I use Plug as my plugin manager and have this line: Plug 'MyPlugin', { 'for' : 'c'} which means it should only load the plugin MyPlugin when a file of the filetype c is opened. This works fine, but ...
Angry Red Panda's user avatar
2 votes
1 answer
526 views

How can I use Tabularize to align by spaces, but ignore spaces in end-of-line comments?

Simple question: I might have content formatted like item1 item2 # this is a comment longer_name1 foobarbaz # another comment that I want to see aligned as follows: item1 item2 # this is ...
Luke Davis's user avatar
  • 1,327
19 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 ...
megas's user avatar
  • 369
0 votes
1 answer
4k views

How to add Plugin in .vimrc file? [duplicate]

I am a new user of vim and want to add a plugin SuperTab for autocompletion. I searched for the plugin from vimawesome and it says Place this in your .vimrc: Plugin 'ervandew/supertab' I've created ...
Hashir Sarwar's user avatar
1 vote
1 answer
157 views

Any vim-plugin to access system clipboard on as many unix platforms as possible?

There are many question regarding this on SE and various solutions have been provided on how to access system clipboard on various platforms. I ssh to various machines and on some platforms, my ...
Dilawar's user avatar
  • 111
9 votes
2 answers
2k views

Drawbacks of using Python to develop new code in a VIM plugin

In one of the vim plugins I use, we have been thinking about using python vs vimscript going forward (https://github.com/python-mode/python-mode/issues/813#issuecomment-344754563). I understand that ...
alpha_989's user avatar
  • 851
4 votes
1 answer
1k views

How can I list the plugins currently *active* when using VIM-Plug?

Oftentimes I'll want to put remaps in my .vimrc that use plugin commands. When a plugin happens to not be installed, these remaps will result in errors. A simple workaround would be to put an if-...
Luke Davis's user avatar
  • 1,327
1 vote
0 answers
238 views

How to migrate from NeoBundle to Dein?

Shougo is no longer maintaining NeoBundle, but instead has re-written a plugin manager from scratch under the name Dein. The Dein GitHub page says: No Vundle/NeoBundle compatibility Given ...
Tom Hale's user avatar
  • 2,451
1 vote
1 answer
67 views

Automatically apply patches when updating plugins

I want to be able to automatically apply my personal patches to plugins when they are updated. For example, I would like to apply this patch every time the vim-fugitive plugin is updated. I am using ...
Tom Hale's user avatar
  • 2,451
0 votes
3 answers
1k views

Show python help() inside vim

I'm new to Vim and would like to know is there a plugin, which allows you to call Python help() function on the word under cursor and shows returned text in the splitter buffer?
gasabr's user avatar
  • 3
3 votes
1 answer
9k views

How an autoload/file.vim is loaded?

I am on WSL trying to understand why my fakeclip.vim doesn't work. I've added let g:fakeclip_platform = s:PLATFORM into ~/.vim/bundle/vim-fakeclip/autoload/fakeclip.vim, but I can't access the ...
nowox's user avatar
  • 429
6 votes
2 answers
453 views

How to identify all the loaded ftplugins for the current file?

I have installed a lot of plugins and each may has its own ftplugin settings. What is the way to find out all ftplugin scripts that have been sourced for the current buffer? Just to summarize the ...
doraemon's user avatar
  • 1,597
3 votes
2 answers
408 views

Which vim plugin should I use if i want to surround specific text with brackets like this?

I just want to transform for(int i = 1; i <= N; i++) if(ord[i] == -1) dfs(i, 0, i); to for(int i = 1; i <= N; i++) { if(ord[i] == -1) dfs(i, 0, i); } as little key I should press as ...
david Hwang's user avatar
7 votes
1 answer
1k views

Plugin help files not found

I am on windows 10 and installed pathogen into home/vimfiles/autoload, and as far as I know all went well. Following the directions here, I installed nerdcommenter. I restarted gvim, tried :help ...
cumin's user avatar
  • 185
2 votes
1 answer
1k views

How to set -complete=customlist behavior?

Case A user defined command to open files recursively in a directory. The command After weeks trying to get this to work, I got to the following code after trying to understand this answer: ...
lsrdg's user avatar
  • 450
2 votes
1 answer
568 views

How can I right-align end-of-line comments with the Tabular plugin?

I often have code that looks something like this: a = 1 # description 1 longer_name = 2 # description 2 # no_longer_needed = 3 # ignore another_name = 4 # description 4 and would like to right-align ...
Luke Davis's user avatar
  • 1,327
-1 votes
1 answer
610 views

CSV.vim how to change the column separator?

I am using csv.vim and I would like to change the column separator from semicolon to comma. How can I change the column separator with CSV.vim? Please, create a label plugin-csv, I don't have yet ...
hhh's user avatar
  • 135
3 votes
1 answer
235 views

How to open file in specific window (create or reuse)?

I'm trying to develop a plugin that would show results of SQL queries, by executing them inside tmux split and using mysql pager option to save them to the specific file. What I want now is to either ...
user1685095's user avatar
  • 1,141
1 vote
0 answers
38 views

Can I make the :lnext, :lprev commands continue at TOP/BOTTOM after reaching the end/beginning of the location list? [duplicate]

The Syntastic Plugin populates the location list with syntax error locations. If navigating these with :lnext, after reaching the end of the file, Vim raises the error E553: No more items. Instead, I ...
Luke Davis's user avatar
  • 1,327
1 vote
1 answer
145 views

Including Utility Libraries in a vim plugin

Is there a pattern for including helper libraries underscore.vim in a Vim Plugin? Ideally I'd like to not ask a user to install additional plugins to use my own Plugin or clobber a user's installed ...
Nick Tomlin's user avatar
2 votes
0 answers
279 views

Comprehesive support for graphviz (linting/autocompletion/snippets)

Vim comes with some support (syntax highlighting) out of the box for the DOT language (graphviz) In addition, I found the plugin: https://github.com/wannesm/wmgraphviz.vim, which provides integrated ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
1 answer
115 views

Wrapping echo for use in VimL

I'm attempting to add some debugging functionality to a small vim plugin that I am working on. I'd like to wrap echo / echom in a way that allows me to turn off output if I want. I've attempted to do ...
Nick Tomlin's user avatar
3 votes
1 answer
186 views

Text manipulation by calling external binaries or scripts

I want to automate certain text manipulation (essentially writing a plugin), but for easiness, I wish to minimize the use of Vim script whenever possible. This is because, indeed it is much harder to ...
Violapterin's user avatar
3 votes
1 answer
2k views

Using Vim-Plug with portable version of gvim (windows)

My university does not (quite understandably) provide administrative rights to users on their public machines (which run only MS Windows 7 OS). As a regular vim user, I use a lot of plugins (...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
1 answer
997 views

Is there Vim plugin that can show keystroke maps or abbreviations for command after it is used?

Is there a tool or plugin for a learner which can display the keyboard shortcuts or abbreviated versions for commands after they are typed in? If for instance I use : to get the command line and ...
vfclists's user avatar
  • 867
-1 votes
1 answer
2k views

How to properly initialize plugins with new vim 8 packages feature?

I'm using denite plugin and I have some intialization for it. call denite#custom#source( \ 'file_rec', 'matchers', ['matcher_fuzzy', 'matcher_project_files']) call denite#custom#var('file_rec/git'...
user1685095's user avatar
  • 1,141
0 votes
1 answer
399 views

Why are ftplugins ignored?

I'm trying to understand why my ftplugin isn't loaded. To get at least some understanding what's going on, I've tried strace -e file gvim test.cpp |& grep ftplugin But this gave me empty output, ...
Ruslan's user avatar
  • 475
1 vote
1 answer
752 views

Setting up an opt-in system-wide vim config

I'm working on a Python 3.6 project (with several friends that are new to Unix) using vim on a debian-based system I own. I'm wondering if there's a way I can setup a system-wide vim configuration ...
Will Wills's user avatar
0 votes
1 answer
57 views

Read, compose and send zimbra emails from vim

I live most of my working hours inside vim. My institution uses an email client server provided by zimbra. The email domain starts with zimbra***inst.fr. Is there a way to read, compose and send ...
Sathyam's user avatar
  • 198