gvim

Vim: Highlight keyword pairs in Ruby (def/end, do/end, etc)

In one of the Eclipse-based editors that I tried out recently (I think it was RubyMine), when a Ruby keyword that either opened or closed a method or block was selected, the corresponding open/close keyword was highlighted. Similar to the way that Vim is able to highlight a corresponding open/close parenthesis. For instance, if I select...

[MAC|G] VIM: highlight all occurrence of a selected word?

How can I highlight all occurrence of a selected word in gvim? (like notepad++..) ...

gVim displays every file with an asterisk on the right (and bold)?

It looks like this: I'm not sure but I think it started to happen when I reinstalled LAMP (Ubuntu). All the files used to look like the ones below (no bold and no asterisk). Any suggestions? ...

Vim C++ auto complete

How do I enable auto completion in Vim? I tried to do this one, but I'm not proficient with the vimrc file, etc., so it didn't work out. Can you give me step by step instructions on how to do this? Edit I tried installing OmniCppComplete. Followed the instructions, but when I try to use it I get the following error: Error detect...

Correct pattern for a VIM autocommand?

I have a windows directory (U:\S) that contains files that must not be changed. Their read-only bit cannot be set, so they must remain writeable. As I have to look into some of the file's content rather regurarly with VIM, I want to make sure that I don't accidentally change the file's conent. So, I put the following line into my .vim...

vim: is there a plugin to show all of your TODO tags in source?

Like most of you, I work in several source files of code every day. A lot of the time, my insane work flow has me doing stuff like: # TODO # clean up this code # do something else with this code Is there currently a vim plugin available that will search for TODO or a similar mnemonic and print a list of my current tasks that are on-go...

Why does Y do the same thing as yy?

I've been using vim for several months now and I've gotten used to using C and D to change and delete everything from the cursor to the end of the line. Consider the line below where the cursor is on the 'b' in 'bar': foo.bar("hello world") Hitting D at this point will yield: foo. While hitting C will do the same plus start insert...

vim indentation correction not working correctly

I'm using vim to edit files that use a programming language where the end of line is not marked with ;. This causes problems when I try to fix indentation in vim. If I put a ; at the end then vim is able to correctly fix the indentation, but since this programming language doesn't have a ; at the end of a statement the indentation isn't ...

how to make vim format source code correctly

I'm trying to use vim to edit source code for AutoHotkey. This is how the source code looks when correctly formatted: if foo { if bar = 1 callFunc1() if bar = 2 callFunc2() if bar = 3 callFunc3() } If I do =G, then this is what vim changes it to: if foo { if bar = 1 callFunc1() ...

Gvim: Ubuntu letter spacing (Consolas font)

Hello, Thought I could just copy my vimrc from my Windows to my Linux box but running into a few problems with the letter spacing on Ubuntu. Hope this is the right place to ask this question with all these new stackexachange sites. Update: The font is correctly installed I think. From the menu I can select it and it works fine. ...

Tab completion in Vim Commands

When I type a command in Vim, for example opening a file, I start to type the file name, and I want to press Tab and have Vim autocomplete the name. However, when I press Tab, vim puts in ^I for some reason. How can I make Vim tab complete? ...

make python os.chdir follow vim autochdir?

Hi, I use the autochdir option in VIM and I also utilize VIM's built-in Python interface. Is it possible to have the current directory for the built-in Python interpreter follow VIM's autochdir. For example, when I am editing a Python file, VIM's autochdir option puts me in the same directory as the edited file as far as VIM is concern...

Vim, automatically remove swap file when file is saved.

Is it possible to automatically remove the swapfile when the file is saved, and automatically create it again when the file is changed? And is this a good idea? EDIT: The reason for wanting to to this is so that I don't have to go through the diff process for files that had no changes after last save if the computer suddenly ran out of...

GVim: Open in a new tab

Hi all, I am using gVim on Windows and facing the annoying thing of having a new gVim window opened whenever I open a new file. Is it possible to make it open a new tab in the same window? Thanks, Rafid ...

Dynamically Detect HTML5 in vim

This is related to http://stackoverflow.com/questions/3232518/how-to-update-vim-to-color-code-new-html-elements, but I want the syntax highlighter to only highlight the elements if it detects the html5 doctype at the first line of the file. Is there an easy way to do this? ...

How can you delete old text in Insert Mode in GVIM

I've just downloaded GVIM for the PC and MacVIM for the Mac and they both have different behaviour to the VIM I was using in MSYS. Here's the problem. I bring up a file in VIM and enter insert mode. I can no longer delete any of old text. I can insert new text and delete them just fine so I know my backspace and delete keys are worki...

Switching between Taglist and buffer in gvim

How do I can switch between Taglist bar and current buffer without mouse? ...

Cannot move cursor in Insert mode

Just noted I can't move cursor to left or right (up and down works correctly) in Insert mode while editing an .sql file, with other files it works ok also. Any hint?. Vim: 7.2.330 - Ubuntu 10.04 x86_64 ...

How do I open a file in read/write mode in Vim?

There is a particular file on my computer that Vim insists on opening in readonly mode. I checked the permissions on the file (I have full control), and if I do :w!, writes happen just fine. However, whether I open the file with :e or from NERDTree, the file opens as readonly. All other files I open work just fine. I just want to kno...

Tool for auto formatting or giving error in VIM.

What are the plugnins for vim/gvim that can report about bad formatting esp C++ code and PLSQL code. Like: blank space after a line. line having character more than 80 (like 'match' does). void foo(int x,int y); then it will report forgot a space after , And many more formatting errors like above. Is there any standard practice for ...