Questions tagged [vim-plugin]

The Vim text editor is extensible through plugins, which can be categorized into general utilities, color schemes, file type-specific settings, and syntax definitions.

If your question is not about programming, consider posting Vim related questions at the dedicated Vim Stack Exchange site.

The Vim editor can be extended through plugins, which are (at least partly) implemented in Vimscript.

Plugins may add a new color scheme, syntax highlighting for a new language, or settings and commands specific to a particular file type. But most plugins offer general add-on functionality that either enhance the use (like the various buffer and file explorers), or integrate with related tools (like revision control systems).

The main repository of Vim plugins is at vim.org. There's a prolific community of plugin authors and a wealth of different plugins. Some plugins are only available on sites like Github or Bitbucket.

1236 questions
6
votes
2 answers

Vim global variable check throws error in lua (neovim plugin development)

I'm trying write a neovim plugin using lua, when checking if a variable exists, lua throws an error like: Undefined variable: g:my_var Method 1: local function open_bmax_term() if (vim.api.nvim_eval("g:my_var")) then print('has the last…
Bmax
  • 590
  • 4
  • 11
  • 24
6
votes
3 answers

The meaning of the status bar (trailing, mixed-indent, mix-indent-file) in vim

I was wondering what is the meaning of the orange part in the status bar? ☲ [573]trailing [515]mixed-indent [515:514]mix-indent-file I am using a .vimrc downloaded from the web, so I am not sure what configuration it has. Could anyone kindly…
Ray
  • 170
  • 3
  • 10
6
votes
1 answer

Vim: how to enter insert-anywhere/canvas mode?

How can you put vim in an insert mode where the entire screen is effectively whitespace i.e. you can type anywhere? I know it's possible, I just cannot remember the command, unfortunately! This allows you to draw diagrams and whatnot easily, I hope…
Stefan Collier
  • 4,314
  • 2
  • 23
  • 33
6
votes
2 answers

How to make js completion pop up automatically in HTML files?

There are two ways to use tern_for_vim plugin in HTML files as the webpage say. use tern_for_vim plugin in HTML files Both method can work ,both of them can't make js completion menu pop up automatically. Method1: 1.vim test.html 2.:setlocal…
user7988893
6
votes
1 answer

How to disable spell highlight within a comment in Vim

I type my LaTeX documents with Vim. I use both spell check and syntax highlight with the default plugins, although I use a customised colour scheme. With this setup, this is the typical view I get in LaTeX documents: As you can see, comments…
Pythonist
  • 1,937
  • 1
  • 14
  • 25
6
votes
2 answers

Unknown function: elm#FindRootDirectory

I'm getting this error message: Unknown function: elm#FindRootDirectory When I open an elm-file within neovim. I'm using ElmCast/elm-vim as a plugin to write elm code. I know I could simply remove this plugin but I want to use it. Also I figured out…
mstruebing
  • 1,674
  • 1
  • 16
  • 29
6
votes
1 answer

Vim requires .vimrc to be sourced every time when running in tmux

I have made several changes to my .vimrc file, which includes several vim-plug plugins, some syntax/coloring options and some key mappings. Whenever I open a new Vim session however, not all of these are being applied (most notably coloring and…
duncanhall
  • 11,035
  • 5
  • 54
  • 86
6
votes
2 answers

DBext (Vim) - A Valid Database type must be chosen

Installed gvim on Windows and trying to run (Microsoft)sql server queries. Getting errors when I try to issue commands specific to dbext. Please see below for details. Vimrc contains this connection string :let g:dbext_default_profile_mySQLServer …
6
votes
2 answers

How can I make Syntastic load a different checker based on existance of files in root?

At work we use a different syntax checker than I do when working on open source. Is there a way to have Syntastic specify a default checker, and change checkers if an rc file is found at the project root? Example: if .eslintrc is found use eslint.…
Yoshua Wuyts
  • 3,926
  • 1
  • 20
  • 16
6
votes
0 answers

(Python) YouCompleteMe is ignoring my code and pip packages

I am using YouCompleteMe on MacVim (vim 7.4 on OSX 10.9.4) for Python code auto-completion. YCM works perfectly when referencing Python built-in functionality (like os.* stuff), but it doesn't seem to be able to auto-complete identifiers written by…
Andrei Bârsan
  • 3,473
  • 2
  • 22
  • 46
6
votes
4 answers

Change emmet's leader key in Vim

Is it possible to to change the way you expand emmet code into HTML? The default is ctrl+y+, and thats about two too many keys for my liking. In sublime I just enter the emmet code and hit tab and it expands it. Is there a way to have it do this…
Mark
  • 3,137
  • 4
  • 39
  • 76
6
votes
1 answer

How to encapsulate Vim plugin code written in Lua/Python/Ruby?

In Vimscript, the script scope s: can be used to avoid name clashes between plugins. I'm writing a Vim plugin in Lua, and I noticed Vim runs all of its Lua code in a common scope. This means my plugin's Lua functions are visible to any other plugin…
Nick Ulle
  • 409
  • 5
  • 14
6
votes
2 answers

vim - maintain a session in shell by executing commands

vim has a number of ways to execute shell commands from within vim. One can jump to the shell and back to vim using shell, ctrl+z the current process and get back using fg. Selected/Current lines can be executed using !w bash. However, all these…
nutsiepully
  • 1,066
  • 3
  • 14
  • 21
6
votes
2 answers

How can I cause the QuickFix window to close after I select an item in it?

I got the wonderful bookmarks.vim plugin to my vim. I especially like the named bookmarks and using the QuickFix window to list them. In the code to show the bookmark list I'd like to add something that causes the QuickFix window to close after I…
Wes Miller
  • 2,191
  • 2
  • 38
  • 64
6
votes
5 answers

Fresh Vim install, Vim permission errors, Vundle not functional

I have the following vim packages installed on Linux Mint Debian Edition: vim vim-common vim-tiny vim-runtime vim-doc I had the above packages installed before, and after installing Vundle (it was functional via instructions on…
Rice
  • 3,371
  • 4
  • 19
  • 23