vim

Opening vim help in a vertical split window

Is there a way to get vim help to open in a vertical split pane rather than a horizontal one? EDIT: to add to 42's answer, you can also control whether the window splits on the left/top (to[pleft]) or right/bottom (bo[tright]) e.g. :vert bo help ...

How can I indent a block of C code in Vim?

Duplicate: How to indent code in vim editor in Windows? Tabbing selected section in VIM Sometimes I want to indent a block of C code in Vim. I usually ended up tabbing it line by line. What is a better/faster way? ...

Jump to function definition in vim

How can i jump to to a function definition using VIM? For example with Visual Assist i can type ALT+g under a function and it opens a context menu listing the files with definitions. How can i do something like this in vim? ...

How to detect vi (not vim) in .vimrc?

I carry a vimrc to all the machines that I work on and it naturally contains options that are not present in old vi. If I accidentally start a vi session on a machine where vi is not an alias to vim and/or vim is not installed, vi reads vimrc and throws a bunch of annoying errors to let me know that option such and such are unsupported....

How can I spellcheck in gvim?

What is the best way to spellcheck in gvim? Is there an add-on or something? Update: I would like it to offer corrections as well. ...

Disabling vim's startup message (vimdiff, vim -o -O ones)

When using opening multiple files with split windows from the command line, vim likes to state what the file names are, the line count, and the character count, for each file. Then the user is prompted to press enter to continue on to the good stuff. Is there an setting or switch to disable this? I'm using this for diffing with Tortois...

Are there any reasons why a C# developer should learn Emacs/VIM?

I work as a c# developer in a purely Microsoft shop. I recently started teaching myself assembly using gas and Linux in my free time away from work. I like messing about with Linux, I'm still very new to it though. I keep hearing I should learn VIM or Emacs but the thing is, there is absolutely no way I'll need to use them in work,...

Unable to count the number of matches in Vim

How can you count the number of matches in Vim? For instance, for the text <? ...

Unable to replace different matches with a single replace in Vim

I tried the following code unsuccessfully :%s/{car,beatles}/mas/g How can I replace car and beatles with mas in Vim with a single command? ...

how can i figure if a vim buffer is listed or unlisted from vim's python api?

for a tool i need to figure all vim buffers that are still listed (there are listed and unlisted buffers) unfortunately vim.buffers contains all buffers and there doesnt seem to be an attribute to figure if a buffer is listed or unlisted the vim command of what i want to do is :buffers unfortunately all thats possible with the vim p...

Why Emacs/Vim/Textmate? Isn't Xcode good enough?

Hi I mostly do C++, Objective-C programming. And I found Xcode plus an auto completion/macro plugin (Completion Dictionary) quite adequate. However, all people seem to praise over their pure text editors. I tried Textmate for a bit; liked its simplicity but dislike its files/framework handling. Am I missing something here? Or, do Vim ...

Calling into a shared object on a key-sequence from vi/Vim

I have a shared library (in binary form; I have the source) that I use to invert/cycle between symbols in source files in Visual Studio. I would like to be able to use the same functionality in vi and/or Vim. Specifically, what I'd like to do is the following scenario: the cursor is on a word I press a key-sequence, e.g. CTRL-I vi/Vi...

Vim Insert Mode on Mac OS X

Apparently Mac keyboards don't have an Insert key (or maybe they do but I can't find it). How can I get to insert mode in vim on a Mac? ...

How to configure IPython to use gvim on Windows?

This really looks like something I should be able to find on Google, but for some reason I can't make heads or tails of it. There's the EDITOR environment variable, the ipy_user_conf.py file, the ipythonrc file, some weird thing about running gvim in server mode and a bunch of other stuff I can't wrap my head around (probably because of ...

Trying to compile and debug C++ from Vim

I've been learning C++ and Allegro using Code::Blocks on Windows XP, and recently felt like learning Vim. However, I have no idea how to compile a program "manually" (i.e., without using an IDE). For compiling from within Vim, I have gotten as far as setting the makeprg to gcc, but I understand I also need a makefile. What is that and h...

vim, ctags, and identically named identifiers

vim + ctags works well for C projects, since C does not allow function overloading and, in general encourages manual prefixing of symbols due to rudimentary scoping facilities. In C++, functions are frequently overloaded, and overridden in subclasses. This makes vim always jump to the tag in the wrong class on "Ctrl + ]". Is there a way...

vim clear last search highlighting

After you do a search in vim you get all the occurrences highlighted, how can you disable that? I now do another search for something gibberish that can't be found. Is there a way to just temporarily disable the highlight and then re-enable it when needed again? ...

treelike structure plugin for vim

Does anyone know of some plugin for vim which would enable treelike note keeping organization like in many today's notekeeping applications. For example, something alike which would according to the tree on the left create another file in a directory structure to enable keeping several files together, under one tree, but still have them ...

VIM: substitute with contents of register / lines range

I'm using VIM, and I want to substitute some placeholder text with a long string, that spans several lines, which is already written somewhere else in the file. Is it possible to replace a pattern with the contents of a register? Something like :%s/foo/<contents of register A> Otherwise, is it possible to replace with a range of line...

Extending Eclipse's JavaEditor (to act like Vim/change KeyListener)

Introduction a.k.a. what do I intend to do feel free to skip this part, no real information is comprised in here Because of the lack of a good, free (as in speech) vim-Mode for the otherwise excellent JavaEditor in Eclipse(3.4), I'm thinking about writing one. The available solutions are: ViPlugin: commercial and not good (e.g. no vi...