vim

VIM: Restore original foreground color for Normal highlight group

Howdy, Is there a way in vim to restore the terminal's original foreground color after changing it with the ':highlight Normal' command? For example, I'm using vim.exe 7.2 in a Windows Command Prompt. My Command Prompt has green text. When I start vim.exe, I can run the following command to change the text to red: :highlight Normal ct...

How can I compile gVim under Ubuntu?

I am trying to install the codecheck plugin for gVim, but to do so I must compile gVim with the plugin. On apt, every apt-get source to a gVim package downloads the normal Vim source, so I guess compiling the GUI must be a configure option. However, I can install the plugin on Vim but I can't compile gVim (since when I make there appear...

How do I find text with yanked text on vim?

Let us say that I yanked the following word: Cheese. Now I want to find Cheese within a text document. I hit the forward slash key(/)... and this is where I end. Is there a way to search with Yanked word? Also, is there a way you can use yanked words in substitution(s:/yanked/beef/g)? ...

set gvim font in .vimrc file

Hi all I am using the gVim7.2 on Windows 7.I can set the gui font as Consolas 10(font size) from menu . I am trying to set this in .vimrc file like below set guifont=Consolas\ 10 But it deosn't work. Does anyone set this before? ...

Can't get "Syntastic" vim plugin to work.

I've installed Syntastic plugin in vim. I can't get it to work. I've tried :SyntasticEnable but no luck. SyntasticEnable python in my vimrc doesn't work either (in fact, it doesn't even parse the command, an error is shown when I try to add it to my .vimrc : Not an editor command: SyntasticEnable python). How can I know what's going on?...

Cursor position in VIM abbreviation

Hi guys, is there some way to tell VIM place the cursor at some position after abbreviation expansion? Say you have something like this in .gvimrc iabberv <? <?=|?> and you want to place cursor where pipe character is automatically. ...

How can I disable code folding in vim with vim-latex?

I have tried the usual approaches, and have read :help tex.vim (see : http://vimdoc.sourceforge.net/htmldoc/syntax.html ) I've taken a brief look at syntax/tex.vim, but can't see how to disable it without rebuilding vim without folding. I'm sick of hitting 'zE'. Lines I've tried in my .vimrc: set foldlevel=manual set foldlevelstart=99...

Vim: SnipMate Plugin: how i can change a .snippet and update it on the fly?

Hi does anyone know how to edit a dot snippet file and reload into (g)vim without closing and re-open the program? it would be great to do that with this excellent plugin. greetings ...

How can I stop all the colors being destroyed when I change hi Normal ctermbg

au InsertEnter * hi Normal ctermbg=233 Doing this causes all the colors from my colorscheme (elflord) to go away and change into defaults. What can I do to stop this or work around it somehow? ...

How to let a .myhtml file has colors as a html file in vim?

I have a html file, it has good colors in vim. But I want to define some custom file types, they have html content, but with different suffix names. e.g. index.html -> index.myhtml But when I open "index.myhtml", it has no colors, only black and white. How to let the vim treat the ".myhtml" as ".html"? Thanks in advance! ...

svn diff with vim, but with the proper filetype

http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/ gives a simple way to use vim for svn diff. Unfortunately, vim doesn't understand the left-hand-side filetype so, there's no syntax highlighting. What's the simplest/best way of solving this? ...

What's the best (Linux-compatible) buffer/session manager for Vim?

Is there a good project / session manager for vim? A session (or project) is a named lists of files, e.g. "bitonic_sort" could identify files "~/A/bitonic_sort.sk", "~/B/bitonic_sort.smt2", etc. (rationale) I have a project where I need to edit files from many different locations, and it is too cumbersome to open them manually each time...

How to stop Vim from opening a new window when opening file in readonly window?

I'm using the MiniBufExplorer plugin to display a list of open buffers at the top of my Vim window. I'm also using the FuzzyFinder plugin to open files, in case that matters. The problem is that, if I have the -MiniBufExplorer- window focused, and I open a file, the window will split: MMMMMM MMMMMM AAAAAA AAAAAA M = -MiniBuf...

tpope's cucumber.vim steps files warnings

I get this warning in step files on every Given, Then, When line: ambiguous first argument; put parentheses or even spaces ...

switching between implementation and header files in vi

In Xcode when editing either an implementation or header file there is a shortcut key to quickly switch to its counterpart. Can this be done in vi? ...

How do I get python.vim to work with vim?

I am playing around with vim and I heard that python.vim has some nifty settings for python. Link to python.vim http://www.vim.org/scripts/script.php?script_id=790 Q1: How do I integrate python.vim with vim? Q2: Because I am not familiar with vim, if I use something like python.vim will it have a crazy effect on non-python files or w...

Regex find-and-replace in vim: Adding .0 to numbers

I have a file which looks like below. 1 1 0 # 1 6 1 0 # 2 8 1 0 # 3 10 1 0 # 4 12 1 0 # 6 How can I add .0 to all numbers, except the numbers behind the #. I think this should not be too difficult to do with a regular expression, but my regex knowledge is too rusty.. ...

gvim tab key doesn't work

I have just started using vim and am using an existing .vimrc and .gvimrc. It works great, except the Tab key doesn't tab...it brings up a code completion plug-in. I don't know where to start as I am brand new to vim. How can I make the Tab key generate a tab??? ...

Vim Macro on Every Line of Visual Selection

I'd like to run a macro on every line in a selection, rather than totalling up the number of lines in my head. For instance, I might write a macro to transform: Last, First Into First Last and I'd like it to run on all these lines: Stewart, John Pumpkin, Freddy Mai, Stefan ... Any ideas Vim gurus? EDIT: This is just an example...

Vim regex backreference

I want to do this: %s/shop_(*)/shop_\1 wp_\1/ Why doesn't shop_(*) match anything? ...