vim-plugin

How to make cursor change in different modes in vim?

故事扮演 提交于 2020-01-01 17:02:14
问题 How can I make Vim change cursor in different modes so that these conditions are satisfied: Without using gconftool or such tools. I need this affect only one instance of Vim, not the whole terminal. This must be working in Gnome Terminal and GVim . PS : I have tried changing with sample in help gcr , but it only works for GVim, and not Vim in Gnome terminal. PPS : I have tested http://vim.wikia.com/wiki/Change_cursor_shape_in_different_modes, but it changed the cursor for the whole terminal.

Vundle for VIM is not working on Ubuntu

元气小坏坏 提交于 2020-01-01 04:20:07
问题 I installed Vundle via the instructions given at this blog http://web.archive.org/web/20120731003342/http://www.charlietanksley.net/philtex/sane-vim-plugin-management but when trying to run :BundleInstall I get a VIM error E492: Not an editor command: BundleInstall Here is my tree ~/.vim /home/max/.vim └── bundle └── vundle ├── autoload │ ├── vundle │ │ ├── config.vim │ │ ├── installer.vim │ │ └── scripts.vim │ └── vundle.vim ├── doc │ └── vundle.txt ├── LICENSE-MIT.txt ├── README.md └── test

vim-surround not working for me. s key deletes instead of surrounds

梦想与她 提交于 2020-01-01 01:12:08
问题 Just installed the surround plugin. New buffer, type Hello World. Say I want to surround that with quotes. In normal mode, V to get into visual mode, s to get into surround Except it doesn't, s deletes the entire line. 回答1: The default visual mode mapping of surround.vim is Shift - S , not lowercase s. You can check whether it's defined with :verbose vmap S . Do the other surround.vim mappings ( ys , cs , ...) work? If not, check :scriptnames and :set runtimepath? for troubleshooting. 回答2:

cannot get SASS (indent style!) syntax highlighting to work in VIM 8

谁说胖子不能爱 提交于 2019-12-25 09:35:10
问题 VIM VERSION: VIM - Vi IMproved 8.0 (2016 Sep 12, compiled May 2 2017 03:55:34) I'm using a number of plugins with vim in order to make things work. I install them via the package manager Vundle, my .vimrc can be found in my dotfiles repository on github Today, I tried to edit a SASS file with vim, however - the SASS file looks like a color-circus: I've followed some steps from this answer which include: Does enabling syntax explicitly fix your problem? :syntax enable Is filetype detection on?

How to change iBus input method in python?

假如想象 提交于 2019-12-23 12:32:16
问题 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, bus.current_input_contxt()) name = vim.eval("a:name") engines = bus.get_engines_by_names([name]) size = len(engines) if size <= 0: print "Could not find engine %s"%name else: engine = engines[0] ic.set_engine(engine) except Exception, e: print "Failed to connect to iBus

(Python) YouCompleteMe is ignoring my code and pip packages

不羁岁月 提交于 2019-12-23 10:09:35
问题 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 me or from various packages installed using pip. According to its documentation, YouCompleteMe uses Jedi for Python code completion, and the Jedi GitHub page clearly states that Jedi can auto-complete any code, not just standard library identifiers

Trigger cursor positioning and selection on going to Normal mode or ESC map

三世轮回 提交于 2019-12-23 03:22:25
问题 Anyone knows how can I trigger cursor positioning and selection from python when going to Normal? This is the script and I had to comment out the ESC mapping in this commit. Relevant plugin source code is bellow: # -*- coding: utf-8 -*- import re import vim #How can we fetch the first param on going to normal Mode without problems?! vim.command( "inoremap <silent> <buffer> <esc> <c-\><c-n>:py clang_complete.firstParam()<cr>" ) r = re.compile( "@[^@]+\$" ) def firstParam(): line = vim.current

Vim plugin - custom auto-complete of params in command-mode

旧街凉风 提交于 2019-12-22 04:20:25
问题 I'm writing my first vim plugin (viml + python). One command that the plugin has is "GetStepCommand()" and it basically fetches data from a remote data source, I massage the data a bit and copies it into the buffer so the user can start editing it. There is a parameter that the user has to supply to "GetStepsCommand" and that is the search path to where the data resides, for ex: /projects/procedure/step Now that path can be long and its easy to miss-spell something. So I wanted to implement

Vim Error E492 - Not an editor command: PluginInstall

一个人想着一个人 提交于 2019-12-21 07:09:33
问题 I am trying to install Vundle on my Macvim. I followed the following link to get Vundle. I also configured my .vimrc file. But when I try PluginInstall, I get the following error. E492: Not an editor command: PluginInstall My .vimrc contains the following: 1 set nocompatible "https://stackoverflow.com/questions/5845557/in-a-vimrc-is-set-nocc ompatible-completely-useless 2 3 " https://github.com/gmarik/Vundle.vim 4 filetype off " required 5 6 " set the runtime path to include Vundle and

How to use vim (key-bindings) with Visual Studio Code vim extension

假装没事ソ 提交于 2019-12-20 09:49:21
问题 I just started using Visual Studio Code and think it's really great. Also installed the vim extension, but I'm struggling with mapping esc to a another key. Normally I have this: :imap jj <Esc> And I can see that VS Code has a keybindings.json file. I tried this: [{ "key": "jj", "command": "vim.Esc", "when": "editorTextFocus" }] Also there is a settings.json file, so I tried: { "vim.keyboardLayout": "en-US (QWERTY)", "vim.insertModeKeyBindings": { "j": "vim.Esc" } } Also did not work. So does