vim

vim find out what is changing the directory

I usually start vim from the folder where I have my Makefile and tags file and edit a file that is two levels down the three. So if I am at folder x I usually would do vim x1/x2/code.c The problem is that recently vim changes the folder to the folder where the code is (so if I do pwd it will show x1/x2). I want it to stay at the top fold...

How to start VIM with NERD tree opened automatically?

Possible Duplicate: Auto-open NERDTree in EVERY tab Is there a way to automatically execute the :NERDTree command when VIM is launched for the first time or configure NERDTree to always open on startup? PLEASE CLOSE. Just noticed that this question was answered before: http://stackoverflow.com/questions/1979520/auto-open-nerd...

vim: delete all whitespace characters up to my cursor

is there anyway to delete every character on the same line as a cursor, all the way up to the cursor? for instance, I might have a line of code that looks like the following: foo = [cursor] Bar.new If my cursor is at the place holder above, is it possible to delete every whitespace character (without using regex?) so that ...

Set transparency dynamically in Konsole

I like the transparency effect on Konsole, but when I'm in vim I need to focus and it can be distracting. Is there a way to dynamically turn the transparency on and off, depending on whether my current window is in vim? Maybe I could run a script in place of vim that looks like this: set konsole transparency off; vim; set konsole transp...

Plugin for browse the functions and variables in Gvim

Hi all Can someone recommend a good plugin for browsering the functions and variables of sources files in Gvim? Best Regards, ...

Installing vim with ruby support (+ruby)

I'm trying to get command-t installed for vim but my current version of vim doesn't have the (+ruby) flag. The command "which ruby" shows that ruby is installed. What do I need to do in order to activate the +ruby flag in vim? Also, what does the +ruby flag technically mean? ...

Fuzzyfinder: any way to open multiple files at once?

I really like vim's fuzzyfinder plugin, but I often find myself wanting to open more than one file at a time (eg. every file that ends in ".py" within a directory). I can't see a way to do this in the docs, but is anyone aware of a way to do this? Alternately, are there any other "fuzzy" file opening plugins with a comparable feature se...

Annoyance when running scripts in Vim (Windows, Ruby)

Hi, I started using vim for my programming projects (mostly Ruby) and mostly everything works just as I want but I have a problem with compiling. Lets say I am working on a Ruby script and I want to run it. I type :ruby sometging.rb (mapped to some other key). Then vim opens a new cmd.exe window and runs 'ruby something.rb'. Then it w...

Detect words or any character after some match pattern, Regex Pattern (Vim)

Hi...! I have a text file patterned like this : 1 textA == this is textA == 1.1 textB === this is textB === 2 textC == this is textC == 2.1 textD === this is textD === 2.1.1 textE ==== this is textE ==== Whats the right regex pattern to formatting the text above: == this is textA == === this is textB === == this is textC == === this ...

Remap RagTag Shortcuts Vim

I just switched to vim as my default editor and I am trying to remap the ragtag shortcuts for <%= %>, <% %> and auto-close tag to custom shortcuts: E.g. the ragtag shortcut for <%= %> is <C-X>=. I tried to remap with: inoremap <leader>, <C-X>= But this just prints the = sign to the current buffer. And there does not seem to be ragtag...

Java IDE with VIM integration for someone coming from C/C++

I'm an experienced C/C++ programmer getting into Java and looking for a good IDE with VIM integration or a VIM plug-in that let me use the same key mappings for things like editing, cscope and omnicompletion functionality. What I mean is that whatever native functionality is provided by the IDE can be mapped to the equivalent vim key bi...

VIM custom function definition / location

Hi all, I have problem with basic VIM function:(I tried googling and cannot find the answer) How can I list all custom function.(I did :function and cannot find my custom function) How can I get the definition of the function in the custom function list (or where they are stored). Thank you for your help ...

how to open a file at a specific line in an existing vim window?

I can open file at a specific line in mvim (on OSX, gvim on linux etc) with mvim file_path +file_line I can open file in an existing window by mvim --remote-tab file_path but I can't combine the two. when I do mvim --remote-tab file_path +file_line I get 2 tabs, one for the file, and another for a new file named +file_line ;) ...

vim key mapping reference

I've just installed the command-t plugin and what to map it to cmd-t instead of leader-t. I'm fairly new to vim and I don't know what the symbols are for the key mappings. Where can I find a reference for the symbols you use when mapping key combos in vim? ...

Yank a region in VIM without the cursor moving to the top of the block?

Is there a simple way (i.e. without writing a script or elaborate keymap sequence) to Yank a group of lines and leave the cursor wherever the Yank was performed, as opposed to at the start of the block? According to VIM's help: "Note that after a characterwise yank command, Vim leaves the cursor on the first yanked character that is c...

Vim command to reset to the oldest change?

Hello everyone, I am a Vim user and sometimes I made several changes in a file but then want to get back to the beginning and have to type :u a lot of times, so I ask you if there is a shortcut to get to the "oldest change"? Cheers! Rodrigo Alves Vieira http://rodrigo3n.com | @rodrigo3n ...

Highlighting embedded code snippets in vim

I often edit markdown files with in-line code examples. these all start with the line “~~~ {.cpp}” (for C++). Is there an easy way to highlight everything between the line “~~~ {.cpp}” and the line “~~~” with C++ syntax hightlighting? (Or even better, make it use “x highlighting” after “~~~ {.x}”.) ...

Number manipulation within Vim

If I have a data file with columns of numbers like 3.14 0.42 6.66 Is there a way from within Vim that I can manipulate these with operations such as addition, subtraction and division? For instance, say I wanted to add 2.1 to each number in a column, how would I go about this? a I can do it by piping to for instance awk, but I would ...

SVN Diff Coloring into Vim

svn diff somefile > check.txt When pushing svn diff into a text file, the output maintains the text coloring when viewing within vim. Is this a vim plugin that was installed with svn, or are their special character encodings to force syntax highlighting in a text file? ...

Command - R like functionality in MacVim

I'm on a Mac and when I am in TextMate editing a ruby file I can simply hit Command-R to execute the file and see the results in a new window. Is there something similar to this using MacVim? It's really important that I be able to open up a NEW window. Reason is because in the current window I might have more than one full page of info...