vim

how to let tab display only file name rather than the full path in vim

If the full path of a file is very long, you can't tell which file is in a given tab. so I'm wondering is there is a way let the tab only disply the file name rather than the full path of the file, might be convenient in some case. need you help, thanks in advance. ...

Vim: how to make the text I've just typed uppercase?

Use case: I've just entered insert mode, and typed some text. Now I want to make it uppercase. It can be done via gUmotion. However, I can't find the motion over the text entered in the recent input session. It's somewhat strange and the concept of such motion is buggy (where to move if you've deleted text, for example?), but it may ...

vim: wrap question

I would like to wrap the text 5 characters before the end of window (without breaking the line). I don't know how to do this without putting an EOL character in the text (wrapmargin/textwidth). ...

Refactoring c / c++ in vim (e.g. method extraction like in eclipse.)

Hi Is there any plugins or built-in method in vim for performing refactoring on c or c++ code, something like the refactoring tools in eclipse? I'm especially keen on the extract method refactoring tool from eclipse that will determine parameters from new method and typically also guess a variable to use as return value. ...

Resolving patch conflicts manually

I've downloaded a patch from some site and trying to apply it (twisted, python web framework). Several hunks failed. How do I automate manual patching process using vim? Details: I'm trying to automate the process of applying failed hunks. Many tiny changes, each about adding/removing 1-2 chars. Difficult to see. I Have to create...

vim: showing listchars changes the screen wrapping

I noted that when I show up the EOL listchars in a text the linebreaks are losen p.e. this is my text of this message becomes after set list ..eol this is my text of this mess age(EOL CHAR) I would like to see the EOL characters without breaking the words at window border. Is that possible? ...

VIM Replace word with contents of paste buffer?

I need to do a bunch of word replacements in a file and want to do it with a vi command, not an EX command such as :%s///g. I know that this is the typical way one replaces the word at the current cursor position: cw<text><esc> but is there a way to do this with the contents of the unnamed register as the replacement text and without ove...

How to detect the position of window in vim

I am trying to customize the mappings for vimdiff and make them similar to winmerge In a vertical 2 way split, I want to map alt-left <a-left> to move current diff to left side and alt-right <a-right> to move current diff to right side. For merging i can use :diffg and :diffp. But I need to know which split i am in so that i can use :d...

What are you ideal vim configuration for php development ?

I use VIM editor for PHP, i know many people will point to PDT but somehow I like to stay with VIM and so What are your suggestions for ideal VIM configuration for PHP Development ? ...

Can someone help fix my vimrc config?

set nohlsearch set ai set bg=dark set showmatch highlight SpecialKey ctermfg=DarkGray set listchars=tab:>-,trail:~ set list autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class set tabstop=4 set shiftwidth=4 set expandtab set autoindent set smartindent syntax on set listchars=tab:>- set listch...

Detect if a key is bound to something in vim

I'd like to know if there is a way to figure out if a key does something in vim. I know that I can use :map to see user-defined mappings, but is there something for the built-in stuff? For example, I always had CTRL-W bound to close tab, because I thought that it was unused. After half a year, I found out that there are some sequences t...

How to get list of files which are currently being diffed in vim

I am writing a vim plugin in which i need to determine all those files which are currently being diffed. That is the ones for which diff is set. I have been going through the manual but could not find much. Is it possible to do this. This question is actually related to question how-to-detect-the-position-of-window-in-vim. In that ques...

Is learning ed worth it to boost my speed in VIM?

I've learned the basic/intermediate levels of VIM (it's too vast to list). I often find that I slip back to my old ways and start using the mouse, holding down keys to get somewhere, and doing other stupid things that could be sped up. Would it be worth spending time to learn ed to break the habits learned from years in a point and cli...

VIM: created syntax not showing up?

HI people I recently changed to VIM for coding in C. I'd like to hightlight the operators +-<=& ... etc I searched in google how should i do it, and i found the answer in this website: I was suppose to do something like: syntax match Operadores /[][><()&!|+*={}-]/ hi Operadores guifg=#000000 gui=BOLD Those characters were supposed ...

GVim theme italics cuts off character

The italics cause the last character to cut off, making it hard to see. Is this something that can be fixed without removing the italics style from the theme? Using GVim with wombat theme on Windows. EDIT: thanks kemp, it was indeed a font bug. ...

C++ indentation not working on Vim

Hi, I am having trouble getting indentation to work in Vim. I am coding in C++. I use vim.nox on ubuntu 9.10 I have filetype plugin indent on I also tried set cident , set autoindent, set smartindent etc. Automatic indentation does not seem to work. ...

how does vim's autoread work

Hi, i'm not sure how vim's set autoread works. The help says "When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again." So after :set autoread I open a file with vim, I switch to an other editor, change the file, and wait to see the changes in vim as well...

Making vim git aware.

I use Vim & Git together. I tend to merge/switch Git branches alot. I tend to have lots of vim buffers open. Is there a way to tell vim: when I execute this git command (which switches branches), reload all buffers? Since I have hooks into all my vim-git interaction, letting vim know when to do the reload is not a problem. The question ...

How can I tell [G]vim where to look for python26.dll?

I have a version of Vim compiled with python 2.6 support enabled (from here). however vim cannot find the python26.dll. :version confirms +python/dyn :version and gvim.exe confirms DYNAMIC_PYTHON_DLL="python26.dll" echo PATH confirms python26.dll is in the search path. (both c:\windows\system32, and C:\python26) What could I be mi...

How can I generate a TAGS file for Groovy classes for use in VIM/Emacs

Exuberant cTags doesn't support Groovy. ...