vim

How to repeat some action certain times on Vim?

In Vim, I usually want to repeat some series of commands some times. Say, I want to comment 5 lines, I would use I//<Esc>j .j.j.j.j Is there any way to repeat the last ".j" part several times? ...

Is there a quick way with macvim/NERDtree plugin to find a file?

What's the fastest way to find and open a file with MacVim? NERDtree is a great plugin, but I still have to navigate (sometimes very deep) directory trees in order to get to the file I want to get to. Is there any functionality that allows me to search a substring of a file name and show me a result set I can click on from that? ...

VIM - multiple commands on same line

I've been trying to find something that will let me run multiple commands on the same line in vim, akin to using semicolons to separate commands in *nix systems or & in windows. Is there a way to do this? ...

vim makefile cerror

When I type :make inside of vim. it 1) exeutes my makefile 2) parses output for file_name/line_number pairs 3) jumps me to line_number of file_name 4) I move around with :cn and we are happy This is mostly good. However, when file_name does NOT exist, vim has a tendency to create this file, which I do not like. When file_name does N...

Editing HTML5 with Vim

Possible Duplicate: How to update Vim to color-code new html elements Default Vim HTML syntax/indent files do not know anything about new HTML5 tags. What is the best way to add support for HTML5 to Vim? ...

Vim (MacVim) backword key problem under insert mode

Look, this is driving me crazy. Under insert mode, when I select a word with mouse (vim shows: --insert(visual)..), and when I press backword key, the cursor would always delete the selected word AND move to one extra word backword. e.g. "a fox jumps". When I tried to delete jumps, after pressing the BS key, vim would delete 'jumps' AS W...

How to quit Vim quickfix?

I know that when you run :make in vim, you can use commands to go through each error like :cn and :cp. However, I often find myself scrolling through warnings that I don't need to fix. Is there a way to quit scrolling through the errors/warnings and resume editing? (I have heard that you can set Vim to ignore warnings, but I've been t...

How to use Vim as Python, C, C++, C# IDE

I am finding it very difficult to use VIM as IDE for programming. Help me get a solution. ...

VIM: Search only between specific line numbers?

I know that with Vim's substitution command you can specific a range of lines: :12,24s/search/replace I want to be able to specify a range with normal searches as well. Something like :12,24/search Since that doesn't seem to work (at least on my Vim configuration), does anybody know how to achieve this? Thank you. ...

Tab to exit quotes in Vim

Usually when I code in Python, I have to create a dictionary, and I press " once and it creates "|", being | my cursor. I'm using TAB key in the snipMate plugin to use snippets. I would like to press tab, when inside quotes after writing a string, that "exits" the quotes, but mantain snipMate. Example: "name|", and, pressing TAB, to be...

VIM latex-suite inserts macro code instead of executing macros

Hi all, I have a problem that's been bugging me for quite a while and that I can't find the solution to. I want to use the feature where I can press <C-j> and the cursor moves to the next placeholder. This works for regular files, but when I edit .tex files (i.e. latex-suite is enabled), this inserts: \right=IMAP_Jumpfunc('', 0) ins...

What is newline character -- '\n'

Hi, This is a very basic concept, but something I have never been able to articulate that well. and I would like to try to spell it and see where I go wrong. If I have to, how would I define a "newline character". say if I create a new file in unix(or windows), then does the file store the "end of line" information by inserting a speci...

Backspace, if chars from cursor to begin of line are tabs/spaces, go back one indent level.

I'm using Vim for Python development. Sometimes, after an expression in an if clause: (suppose | is cursor). if test: pass | ...I press enter, and want to go to the if identation level. I know I can go back to command mode and just press <, but I would like to know if it's possble to, when Vim knows all characters behind the...

What can I do in VIM that I cant already do in Visual Studio?

I heard it takes 30 days minimum to get comfortable with vi. I'm on day 2 hehe. Right now, I seem to be merely memorizing different shortcuts for things I already did in visual studio. (incremental search, prev/next word, etc) So far the most powerful aspect seems to be the numeric keys combined with commands (5 * next line), and the i...

vim: plugin that allows me to jump from opening div to closing div in HTML?

I'm having a difficult time to find an opening div in deeply nested HTML that has been poorly written. Is there a plugin out there that will give me support to jump to the equivalent open/closing div using vim/gvim/macvim and other variants? ...

Where color of cursor line is defined?

If I set cursorline option I get my current cursor line underlined and all characters which color is not specified also turn to yellow (yellow appears only if Normal highlight group is untouched). I wonder, where this color (yellow) is defined? Edit: I know about CursorLine highlight group. The problem is that in default colorscheme whi...

How come I get 'E492: Not an editor command' when trying to run :RmVimball in VIM?

Hi, So I installed the Command-T VIM plugin but it did not work. In fact it made VIM not work. I installed Ruby 1.8.x like it asked. I followed the install instructions to a tee but nothing. So I tried to uninstall it. I opened a no-frills version of VIM by running vim -u NONE -i NONE Then from with in VIM I typed :RmVimball com...

Using an argument of a function in normal mode in Vim?

I have a Vimscript function defined like this: function Cs(a, b) normal a:a|"cylr a:b|x"cP endfunction However, the intended action (do some crazy stuff with the arguments a and b in normal mode) doesn't work, instead it takes the first "a" as "append" and writes the rest of the line to the file. How can I use arguments on a "no...

Is there a vsVim User Guide?

I've just recently downloaded vsVim to use it with Visual Studio 2010 and join the Vi way. But I haven't been able to find information regarding the specific vsVim documentation. I know how to use Vim (basic use, nothing even intermediate) but I would like to know if there is something that is still missing from the vsVim implementati...

Vim Open Resource

Hello all. When programming in Eclipse I love to use the Open Resource dialog (Ctrl + Shift + R), which opens a simple filter with all the files in the project. My question is: is there something similar for the Vim editor. Thanks in advance. ...