vim

How do I make this change in my VIM config?

Control + Right = end Control + Left = home Control + down = page down COntrol + up = page up I want these to work, regardless of what mode (insert or not) I'm in. What do I put into my .vimrc? ...

Filename completion in vim with xterm doesn't work as expected

Something funny is going on with my vim. I'm using it through xterm. I want to be able to autocomplete filenames that I try to open. For example: # Cursor is | character :o exam| :o exam|<TAB> :o examplefile.txt| I was sure vim supported this, but it's not working for me. When I hit <TAB> an ^I character is inserted instead of comple...

How can I open a help file in Vim on a new buffer in an existing window?

I often take a look at help files in Vim, but sometimes I want to read one in full screen. Since the :help command opens it in a new window, and closing the old window, if it was the only one besides of the help file, for some reason closes Vim, the only way I found of doing this was opening the help file, and then reopening it in a new ...

.vimrc for IntelliJ Idea's vim plugin

I am using the vim plugin for IntelliJ Idea. Where should I place the .vimrc for that plugin. Using Windows XP ...

How to append at the end of line using VSVIM

I am using vsvim and I think that it is a great tool. But I have a problem. It seems the "A" doesn't work when I type 'A' to append at the end of line. Is there any extra configuration required? Or it is just a bug of VSVIM. ...

Key Mapping for ViPlugin for Eclipse

I want to duplicate some of my Vi key mappings in the ViPlugin for Eclipse. Specifically, I use "jj" for the Esc key, which is done like this in my rc file: map! jj <Esc> The ViPlugin User Manual explains how to set up some rc file type of configurations. The example given is: <?xml version="1.0"?> <xml> <shiftwidth>4</shiftwidth...

Opening Vim and using some command in normal mode from the Terminal?

I want to be able to open Vim and automatically make some commands in normal mode (in this case, open two buffers put a mark in one line on one line, fold another line, and go to the bottom of the file). The closest thing I found would be using the -c or + command line switch, however these execute commands in Ex mode. For example, I wo...

Enablind and Disabling word wrap automatically on different file extensions on Vim

I usually have to read .txt files with long lines, and at the same time edit some source file, and I like to see word wrap on the .txt files, and not in the ones that aren't. Of course I can :set wrap and :set linebreak, but is there any way to make it automatucally, and dependent of the file extension? ...

How to make vim substitute <script with <script type="..."></script>

I created the following rule: iabbrev <lt>script <script type="text/javascript"></script> But during launch vim says: Error detected while processing .vimrc: line 290: E474: Invalid argument Pointing on that line. And I cannot workaround this, seems like the problem is in the left part, just like "script" is a reserved word. Is ther...

Reopen a file closed by vim quickfix

When I use vim's quickfix to jump to errors in my build, if the file containing an error isn't already open it opens it in one of my splits, replacing the file I had open. Is there a way to either reopen last closed file in a split or get quickfix to open files in a new split? ...

Vim: highlight latex comment using a differnt file type.

I am using vim to write latex. I would like to highlight the latex comments using a different file type. (For example I would like to highlight the latex comments using c++ formatting). Is there a way to do this? (Edit) Example: \section{Introduction} % This is a comment. I would like to higlight comments using the % synta...

Use VIM Visual Block to concatenate blocks

I try to use VIM build my SQL query by concatenate block of strings. For example, I have the following strings in three tabs in VIM: # block one where c = '123' where c = '2345' ... # block two set b = 12 set b = 345 ... # block three update myTable set a = 'abc', update myTable set a = '23423', ... each block contains 100 lin...

Vim: creating a C string literal around a block of text with vertically aligned quotes?

I would like to create a macro or a script in Vim that does the following: wrap a block of text in double quotes escaping any quotes that appear in the text itself have the quotes on the right side in vertical alignment For example: <html> <head></head> <body> <h1>High Score Server</h1> <table> ROWS </table> </body> </html> would ...

Best way to open an URL in Vim

Lets say that you have either URL or a link on a webpage that is a text file. How would be the easiest way for the user to be able to open that file in a Vim? Right click and save link as? Use a specific file extension that defaults to Vim? Command line command? ...

Paste from clipboard in vim script

I want to write a vim function that includes pasting from the clipboard (windows if it matters) I think it should be something like function MyPastingFunc() "+p "paste from clipboard "do more stuff endfunction Of course the "+p is just a comment in the .vim file. How can I make this work? ...

How can i set the plugin's option in .vimrc

I use NERDTree plugin. Now i want to set the 'NERETreeHijackNetrw' option to value 0. what should i write into my .vimrc ...

How to delete multiple buffers in Vim?

Assuming I have multiple files opened as buffers in Vim. The files have *.cpp, *.h and some are *.xml. I want to close all the xml files with :bd *.xml. However, Vim does not allow this (E93: More than one match...). Is there any way to do this? P.S. I know that :bd file1 file2 file3 ... works. So can I somehow evaluate *.xml to file1....

What do I change in my VIM config to do this? (remove the arrows)

My files have this "invisible arrows" How do I disable this completely? --->--->--->--- This is my vim config. What do I have to change to do this? 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,f...

Show Vim omnicomplete on certain characters instead of Ctrl-X Ctrl-O?

In Vim 7, Ctrl-X Ctrl-O shows a list of possible values but I find this sequence of keys to be too long when I frequently use the autocomplete feature. For instance, in an HTML file, I'd like to see the list automatically popup after I type a < followed by one or two letters. In a CSS file, I'd like to see the list after I hit the ":" ke...

Howto get args in vim autocommands

Hi, I'm trying to create a custom vim filewrite command of the form: autocommand BufWriteCmd py function() :w argv1 argv2 argv3 ... The autommand itself is working, but I can't figure out how to access argvN from the python function or how to pass it along (I also get an error when I'm passing mulitple argvs to :w "only one filename...