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
4
votes
1 answer

How to change iBus input method in python?

I am writing a Vim plugin to set iBus engines and input methods. So far I can change the engines with the code below: function! im#setEngine(name) python << EOF try: import ibus,vim bus = ibus.Bus() ic = ibus.InputContext(bus,…
Horacio
  • 2,727
  • 5
  • 26
  • 29
4
votes
1 answer

vim you complete me error on c++11 syntax

I installed You Complete Me with Vundle and then ran cd ~/.vim/bundle/YouCompleteMe ./install.sh --clang-completer And added let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleMe/cpp/ycm/.ycm_extra_conf.py' to my vimrc file. Now when I…
amin
  • 3,672
  • 5
  • 33
  • 61
4
votes
1 answer

Is there a vim plugin for semantics/syntax highlighting?

I have a question regarding if a vim plugin exists. I googled it and couldn't find anything so I thought maybe I used the wrong key terms in my search. Recently I read this article https://medium.com/p/3a6db2743a1e about semantic coloring where each…
refikh
  • 41
  • 1
  • 6
4
votes
3 answers

Why won't vim recognise a plugin command in the vimrc, but it will recognise it when running?

I've installed the vim-gitgutter plugin with pathogen. I can type :GitGutterLineHighlightsEnable from inside vim and line highlights are turned on, great. But I want line highlights to be automatically enabled at startup, so I added the command to…
Jordan
  • 2,281
  • 1
  • 17
  • 24
4
votes
0 answers

Pasting copied text to vim encoding issue

I copy some russian text from browser to vim then in insert mode pasting it via CTRL-R + * and getting a whole bunch of unreadable characters. I tried to set some fileencoding encoding and termencoding to utf-8 but that did not work. My OS is Ubuntu…
Karen Grigoryan
  • 5,234
  • 2
  • 21
  • 35
4
votes
1 answer

How to correctly run an infinite loop and still work with buffers in a VIM plugin?

I am writing a VIM plugin in Python. I would like to be able to run a function that would wait for events in the background and update a buffer when needed, without freezing the whole window. Is that possible? I tried running a separate thread using…
Lev Levitsky
  • 63,701
  • 20
  • 147
  • 175
4
votes
2 answers

Is it possible to remap an Ex command in Vim (remap :Ack to :ack)?

I use the Vim plugin ack.vim, but I don't understand why the command is :Ack with a capital "A" (a little annoying to hold shift). Is it possible to remap this to :ack?
hobbes3
  • 28,078
  • 24
  • 87
  • 116
4
votes
1 answer

How do I get the value returned from a function in Python & Vimscript?

I'm using Python to write a vim plugin, but there's something wrong when dealing with Vimscript. function! Login() python << EOF import vim, weibo appkey = 'xxx' appsecret = 'xxxxx' callback_url = 'xxxxxxxx' acs_token = 'xxxxx' expr_in =…
yakiang
  • 1,608
  • 1
  • 16
  • 17
4
votes
1 answer

Vim+CtrlP: Behavior to initially show MRU files and switch to searching files when typing

I'm having hard time configuring CtrlP for vim the way I want it to work. Ideally I'd like CtrlP to open with a list of files in most recently used order. However, when I start typing it would switch to searching for files under my current working…
samuke
  • 450
  • 1
  • 5
  • 15
4
votes
1 answer

How to use second argument (input) of system() function

The documentation to vim's system function says this about the second argument: When {input} is given, this string is written to a file and passed as stdin to the command. What I understood from that was that if your system call looked like…
benekastah
  • 5,651
  • 1
  • 35
  • 50
4
votes
1 answer

vimwiki style links without vimwiki?

One of my favorite features of vimwiki is the way it handles links. Unfortunately, I use something else (vimoutliner) for my main note-taking, and it doesn't have anywhere near the linking capability that vimwiki does. Is there a plugin that adds…
Chris
  • 291
  • 5
  • 14
4
votes
3 answers

Is there any vim plugins written in python?

Just like Command-T. Command-T requires Vim compiled with Ruby support. Is there any vim plugin written in python?
user873792
  • 323
  • 2
  • 8
4
votes
1 answer

C.Vim plugin, adding Automatic Header to *.h file

I have just downloaded and installed the C-Vim plugin for C/C++ development in Vim. When I create a new .c file, a header is automatically created from a template - I want the same thing to happen when I create a new .h file. Instead, I get the…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
4
votes
2 answers

How to truncate long file path in vim-powerline statusline?

I would like to truncate my file path to ex: a/a/j/c/popularCategories.js.
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
4
votes
2 answers

Vim templates, get filename and use it

I am writing a rudimentary Vim template for Java files that creates a bare skeleton class when I create a new file with the .java extension. Example: vim Banana.java Vim creates a file including code like this: public class TODO { public static…
Robottinosino
  • 10,384
  • 17
  • 59
  • 97