vim

How to remap <C> (control) modifier key in vim?

I avoid the "control" key, AKA <C> in vim parlance, on my laptop; I hate where Apple put it. I would really like to remap all of the vim commands using control to instead use "command", but this does not seem possible on a Mac, despite what I have read. I have read that I should use <Leader> to set such mappings, but I want to avoid rema...

Pathogen does not load plugins.

Pathogen does not work for me. I am following Adam Lowe's hints posted here (and few more) without any success... My vimrc: filetype off call pathogen#runtime_append_all_bundles() filetype plugin indent on set nocompatible syntax on set tabstop=2 set smarttab set shiftwidth=2 set autoindent set expandtab set number colorscheme darkbl...

Opening the header file to a C/C++ source file with vim from multiple directories and multiple extension.

First off, I was about to write a long list of if/else statements in vim and realized that 1) there was a better way to do what I was trying to do and 2) SO would be ripe with help on the subject. So! I have a variety of files spread about like foo/src/file01.C foo/src/file02.cc foo/src/file03.c foo/include/file01.hh foo/include/file02....

Shift a block of code to right

Hi all I am using the VIM.Here is my situation: 1111111111111 2222222222222 3333333333333 4444444444444 Above is the original code, I want to make them like below. After I select these four lines, what should I do to shift them? 1111111111111 2222222222222 3333333333333 4444444444444 Best Regards, ...

locking marks in VIM

Is there anyway (internal or via a plugin) to prevent marks to be overridden ? I mean a way so you can't set a mark if it's already used (I'm thinking especially of global marks). I'm thinking of adding them in my vimrc or session, but I would prefer another way. Update Don't send me a script to do it. I can do it myself, my question ...

vim -- copy to system clipboard in OpenSuSE

I've tried the methods mentioned at http://stackoverflow.com/questions/677986/vim-copy-selection-to-os-x-clipboard, but neither the * or + register seem to be working for me. I'm on OpenSuSE 11.3, and have vim and vim-data installed (there is no vim-full package as mentioned in the link in SuSE). I've tried with Klipper enabled and disab...

more syntax-aware navigation in vim

I have a good amount of code which looks like this: rule requestIntHoleTemplate { constr:HoleCall; y:PrimitiveIntRange; :IntRangeHole(constr, y); modify { emit("Request template IntRangeHole\n"); ...

VIM Key bindings for Adobe Flash Builder 4

I was curious if anyone knew of a way to get VI/VIM key bindings in Flash Builder 4. I know that I can just edit the files in VIM directly, but as I am just getting started in Flex - I would prefer to use the IDE until I get my feet about me. I am running Flash Builder 4 on OSX Snow Leopard. Any help would be greatly appreciated. ...

git diff in my mvim

I was used to doing git diff | mate but my new machine does not have mate and I use mvim. So I tried git diff | mvim and that did not work. What is the best way to see git diff in mvim editor. I am using mac and I use mvim. ...

Macvim and rails.vim on rails 3 rc - Uninitialized constant Bundler (NameError)

Configured vim and gvim on Windows, as well as vim and macvim on OSX. Intend to learn rails 3, so installed rails 3 rc on both OS'ses. So far, so good. When using macvim, each and every script execution offered by rails.vim gives me errors "Uninitialized constant Bundler (NameError)". Tried :Rserver, :Rgenerate, .... However, staying on...

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...

help on a vim search / replace complex regular expression

Hi, Here's what I'd like to do with a regular expression: 2 steps: (1) transform all variables in a selected area like this: $Sejour_deb_mois $Info_pays to : $SejourDebMois $InfoPays (2) transform all variables in a selected area like this: $this->Sejour_deb_mois $this->Info_pays to : $this->SejourDebMois $this->InfoPays An...

Appending a message to a buffer from a Vim script

What's the best way to append the content of a string variable from a Vim script? ...

Is there any "code corrector" for Vim which highlights HTML, PHP, CSS mistakes??

Sometimes when I make coding mistakes I spend a lot of time finding the error. Is there a plugin which makes Vim underline or highlight PHP, HTML or CSS mistakes? For instance: <?php foreach ($row as $r) { <echo '<h1>' . $r->title . '</h1>'; } ?> The '<' before echo will be highlighted in red. Vim has HTML correction but I n...

How to add Intellisense for a language in Gvim?

Hi everyone, I'm a newbie to GVim and I use GVim on Ubuntu 10.4 OS. I'm learning Ruby now, and I want to add Intellisense for it. My question is: is it possible to add a set of API for GVIM, not only for Ruby but maybe for Perl, Java, C++...etc? Thanks, ...

how to place the cursor to the place you last edited

when I open a file using vim, I'd like vim put the cursor to the place where I last edited so that it can save me lot of searching time to go back to the last edited place in order to, might be, continue the unfinished edit work from that place. ...

How can I debug a Vim plugin not being loaded?

I'm trying to use the Vim snipMate plugin, and I've installed it as it directs, but when I press tab nothing happens. How can I debug this? Are there log files Vim makes when it tries to load stuff? How can I see what plugins its loaded correctly? I've tried :sni<tab> to see if there's anything called snipsomething installed but noth...

VIM "." in cword?

I'm in VIM. I want to consider "." are a character that is part of a word (rather than a character that separates words). How do I do this? Thanks! ...

vim replace for a pattern

<created> [email protected] </created> I want to replace the above with but the username may vary i.e,[email protected] ,[email protected]... <created> [email protected] </created> What is the command to replace this in vim %s/<created>\r*\r</created>/new string ...

How to have a carriage return without bringing about a linebreak in VIM ?

Is it possible to have a carriage return without bringing about a linebreak ? For instance I want to write the following sentences in 2 lines and not 4 (and I do not want to type spaces of course) : On a ship at sea: a tempestuous noise of thunder and lightning heard. Enter a Master and a Boatswain Master : Boatswain! Boatswain : Here,...