vim

Showing a different background colour in vim past 80 characters

I have seen http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns, but the answer there hilights only actual content that goes over the 80 character mark - I want to be able to have a vim window open with 100 or more columns, with the leftmost 80 columns using the normal background and anything past that using a slightl...

How to see list of html-tidy errors in VIM for Windows?

I am using Vim 7.2 on WinXP. I've tired to run tidy like this: :compiler tidy :make :copen When I do :copen it shows me no errors to jump to. I've seen references that shellpipe might need to be set a specific way, but that refers to an earlier version of VIM. How should I be using HTML-tidy with VIM, and do I need to mess with shell...

How can I specify a different configuration for Vim based on the executable name?

I am trying to open Vim with different configuration options depending on the executable file name. I intend to create a number of symbolic links to vim and I'd like to do something like this in my .vimrc if execname == "vim2" " configuration here endif Is there a variable in Vim that holds the name of the executable file being run...

Unidentifiable Vim Keymap

Hi I'm trying to get rid of a pesky keymapping in vim, namely \c The mapping is only loaded for latex files, so it should be related to the latex-suite. It's annoying, because it can't type \cite without this keymap ruining everything. I can unmap it "manually" by typing: :unmap! \c But this doesn't work when I put that into my ...

Pasting in command mode or search mode (/) in vim

Are there special key bindings for pasting in command mode or search mode in vim. I would be really helpful in pasting long command or search strings ...

Vim searching through all existing buffers

When dealing with a single file, I'm used to: /blah do some work n do some work n do some work Suppose now I want to search for some pattern over all buffers loaded in Vim, do some work on them, and move on. What commands do I use for this work flow? ...

how to strip file type extension in vim

In my .vimrc, I set different makeprg according to the source file type as following : au BufRead,BufNewFile /home/me/cpp/**/**.cc set makeprg=g++\ %" au BufRead,BufNewFile /home/me/c/**/**.c set makeprg=gcc\ %\" It's good practicse but not perfect. the problem with this setting is that you can just have on binary with the default na...

Do we have any asp vbs complete for vim?

I see a lot of complete for gvim such as php, c , css, but I can't find any complete form aspvbs ...

VIM Question: When a .swp file exists, is it possible to add a "(D)elete" option

Many times when I lose connection to my development server, I just log back in and have a .swp file to deal with when I re-open. Does vim have a mod to allow deleting by initial prompt? Thanks ...

Package management for Vim

Emacs 24 looks like it will have a package manager. What package management options are there for Vim? ...

vim superuser mode

After opening a file in vim,And if that file is created by root .How to change the current user to superuser mode without quitting or before saving. Thanks. ...

how to adjust the default width of taglist window in vim

The default width of taglist window is too narrow for me and sometimes I can't see the whole function name in the window so I'd like to adujct the width of the window. I know use ctr-w > or ctr-w < I can adjust the window manually , but really want to change the default value of the taglisst window. so how I can actually do it ? thansk i...

Vim syntax highlighting: make region only match on one line

Hello I have defined a custom file type with these lines: syn region SubSubtitle start=+=+ end=+=+ highlight SubSubtitle ctermbg=black ctermfg=DarkGrey syn region Subtitle start=+==+ end=+==+ highlight Subtitle ctermbg=black ctermfg=DarkMagenta syn region Title start=+===+ end=+===+ highlight Title ctermbg=black ctermfg=yellow syn r...

can't get syntax highlighting to work with R code in vim

This is a naive (and likely dumb) question, but I can't seem to get the R syntax highlighting to work with my Linux setup. I've downloaded a r.vim file that has improved syntax highlighting, and it works on my Windows gvim setup. Does this r.vim file need to be in the /usr/share/vim/v70/syntax directory? Right now, I have it in my h...

Indent or comment several text lines with VI

Hi, can vim or vim be used to comment or indent at the same time a number of lines? For instance: for item in Lista: ind = int(floor(1.0*(item-lmin)/width)) if ind==nintervals: ind=ind-1 print item,ind comment it to: #for item in Lista: #ind = int(floor(1.0*(item-lmin)/width)) #if ind==nintervals: ...

Use VIM omnicomplete for javascript with ctags

I am using vim/gvim for 4 months already and now I found a way to use it's strengths. My tags file is generated very well and here is a simple row in it. my.namespace.classname /path/to/file.js /^my.namespace.classname = function(first_arg,$/;" f Here is an example what i need to omnicomplete: my.namespace.cla <- omnicomplete list...

Custumizing Syntax Highlighting in Vim

How I can keep all the current formatting for a file type but add functionality. I would like to highlight colors in .vim files so that each color is highlighted how the terminal will resolve it. I created a vim.vim file containing: syn keyword yellow yellow containedin=All highl...

How does one escape backslashes and forward slashes in VIM find/search?

For instance, if I wanted to a find and replace with strings containing backward or forward slashes, how would this be accomplished in vim? Thank you! Examples Find & Replace is : :%s/foo/bar/g what if I wanted to find all occurences of <dog/> and replace it with <cat\> ...

Combining multiple lines into one line

I have this use case of an xml file with input like Input: <abc a="1"> <val>0.25</val> </abc> <abc a="2"> <val>0.25</val> </abc> <abc a="3"> <val>0.35</val> </abc> ... Output: <abc a="1"><val>0.25</val></abc> <abc a="2"><val>0.25</val></abc> <abc a="3"><val>0.35</val></abc> I have around 200K lines in a file in the In...

vim how to comma align

I have a bunch of code of the form: someVector.push_back(Foo("some name", 1.0, 3.1415926); someVector.push_back(Foo("different length name", 89.0, 2.717); ... 20 more entries I want sufficient space to be inserted so that my code is comma aligned, i.e. the "1.0," 's comma and the "89.0"'s comma are aligned -- is there builtins to do t...