Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great.
It also has Ruby pre-installed (version 1.8.7) which is great too.
However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enabled).
How to enable ruby for my VIM installation?
...
Is there currently a plugin that you ruby on rails developers that are also using macvim/gvim/vim that allows you to take a quick block of code and create a partial from it? I know that TextMate does this, figured someone has ported it by now to vim also.
...
When I try to fix the indentation of an HTML file with gg=G, each line looses its indentation and becomes left-justified. Does anybody know what could be going on here?
Thanks.
::EDIT::
test.html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Indent test</title>
</head>
<body...
I'm on Ubuntu Linux 10.04. I use vim for most of my development and CodeBlocks for debugging. When I first moved from Windows to Linux, I noticed that vim was showing ^Ms for newlines, and found out that this was a Microsoft thing. However, even after removing them I notice that they sometimes reappear in files (files that I edit in Code...
Does anyone know if there's a way to format the date generated by strftime in Vim (under MS Windows) such that Month, Day, and Hour are not padded to two digits with a leading zero?
For example, the following commands in vimrc:
nmap <F3> a<C-R>=strftime("%I:%M %p %m/%d/%Y ")<CR><Esc>
imap <F3> <C-R>=strftime("%I:%M %p %m/%d/%Y ")<CR>
...
I am working on a project writing a GLSL fragment shader, and it just so happens it has the file extension .fs, thus vim automatically loads the forth syntax upon opening the file.
This normally would be no problem, I could just change the syntax using au BufRead but for some reason the forth syntax is loaded first, which completely me...
I'v been using vim/gVim so far in my Linux Machine, and I have a Windows machine as well. In this windows machine I'm mainly notepad++.
I would like to store all my .vimrc settings and .vim folder in Dropbox, and create symbolic links in Linux pointing to them, and them do the same in my Windows machine.
I have plenty of "home shortcut...
Hello
Using vim 7.2.330 on a Ubuntu host from an XP host, I'm stuck at how to type/paste the following line in a text file:
include_once(‘/full/path/to/app’);
The document says it's important to use ASCII 145 and 146, but vim turns them into "<92><93>", and Nano turns them into �.
Note that I'm using a European keyboard layout, no...
I'm trying to look at a file that was saved without a BOM as wchar text. In my gVim window I see:
T^@E^@X^@T^@H^@E^@R^@
...which is really annoying. I want to edit this file as a regular text document, and I'd like vim to save it in the same format. I've tried doing :set encoding=utf-16 (and other variations such as utf-16le, ucs-2, a...
If I have the following words
cat Oliver Louis
and the cursor is on "c", I can copy up to the beginning of Louis with y/Louis<CR> (where "CR" is the enter key), which will copy the string "cat Oliver ".
Is there a way to copy the search term, "Louis", as well, for a copied string of "cat Oliver Louis"? Thanks in advance.
...
Consider the following block of code-
if (1==1):#Go forever
print "Wooo."
Vim doesn't see the :, due to the comment, so it insists that the print should be at the same indent level as the "if"
using http://www.vim.org/scripts/script.php?script_id=974
Any thoughts would be appreciated.
...
I'm in the process of learning vim, and i just learned about marks. Before this i found it useful to have all the source code files i'm working on in their own tabs. When i found out about "global" (capital letter) marks i thought it would be a great way to switch to a tab which already has the marked file open, and scroll to the correct...
Suppose I have a comment block like this:
/**
* comment
* comment
* comment
*/
And when I open a new line inside this block I want vim to start it with
/**
* comment
* _
* comment
* comment
*/
but autoindent in standard (ubuntu) vim scripts starts an empty line, like this:
/**
* comment
_
* comment
* comment
*/
Is ...
I'm using both Vim en Emacs (Vim for a few years, emacs for a few months). I like both but I tend to see Emacs as a bit cumbersome and unfinished. For example some very basic action such as copying a word has to be added if you want it. But I love the fact that you can easily customize it.
I'm currently reading Coders At Work and I love...
To my understanding, you can add files directly from MacVim with the NERDTree plugin. I navigate to NERDtree and hit 'm' to bring up the NERDTree filesystem menu as described in this post: http://stackoverflow.com/questions/1459750/vim-and-nerd-tree-extension-adding-a-file
The problem is, I get this output after invoking 'm':
NERDTree ...
Is it possible to have Vim autocomplete show which functions are available to a given module?
So if I include a module called math and then go:
math::
and at that i could get a list of the functions available through that module.
...
Hi,
I'm just starting learning Ruby and decided "wth, let's pick up vim and get used to it in the process". That sounded like a great idea until I actually downloaded gvim and started ... staring at it. Ok, I'm not a total noob, I know how really basic things are done in vim, what I'm looking for is how to setup vim and what plugins I n...
Over the years, I thought I'm a Vim master! Recently I visited a real Vim master! oops! My knowledge is awfully superficial!
For example I didn't know it's possible to add a \c to make search case insensitive. (instead of :set ignorecase)
I clearly remember when how I'm surprised when I found SuperTab or TagList plugins first time. Vim...
hi,
is there a trick to fold all other functions but not the function in there my cursor is?
...
To start at a specific line I would use:
$ vim FILE +LINE
But what parameter needs to be passed to vim to position the cursor in a certain column of this line?
...