vim

How do I make vim-latex compile correctly without having to save?

I just started using Vim-Latex. The default dvi output didn't work for me, so I changed the default to pdf by adding "let g:Tex_DefaultTargetFormat = 'pdf'" to my tex.vim. The only problem is that I need to save my document first (:w) before compiling it (\ll) and viewing in in Evince (\lv). If I do not save it, and run \ll and \lv, late...

What are some good resources for learning to develop VIM plugins?

I am learning VIM and would like to try to hack on some VIM plugins, but can't seem to find any resources for learning the scripting language. It seems like its called VIMscript, but I'm finding almost nothing useful on Google. Does anyone have any recommendations for learning how to develop VIM plugins from scratch? Thanks ...

How to compile from gVim on Windows with GCC from Cygwin and then run the program?

I've been working at this all morning and I still can't find a way to easily bind a key to compile my program from the Windows version of gVim using the Cygwin GCC, and then run it. I'm kind of a novice to Bash scripting, and I haven't been able to make it create the .exe in the home directory (C:/cygwin/home) and then run it. What I h...

Case-sensitive keyboard shortcuts

I'd like some map/remap/nmap/etc. commands to be case sensitive, e.g. "<C-I>" vs. "<C-i>". I checked Google and :help map, but was unable to find this. ...

VIM syntax high-lighting chokes in CSS files using data:image

I have a CSS file with some pretty basic stuff including a data:image like so: #next { background-image: url("data:image/png,%89PNG%0D%0"); The actual data string is much longer, but I've truncated for this post. The vim CSS syntax highlighter chokes on that long string and forces the rest of my css declarations in that file to n...

How does Vim display :ls results (curses/cooked mode)

When I am inside Vim, and i type ":ls", Vim lists the buffers. Most likely it is going into "cooked mode" using def_prog_mode() and endwin(). WHat I'd like to know how does it print the values now. The best i've come out with is using system("echo ....")which would be quite laborious. I've tried printf - no effect, and printw. I need to...

Do you think/write differently in vim and emacs?

In many scripts that I write, I often construct programs in a "functional style". That is to say, I basically define a lot of functions at the beginning, and then later apply these functions. This results in a sequence of nested function calls, wherein I type out: function name its arguments next function name its arguments ...and s...

What can you execute on visually selected text in vim?

Hello, What are the possible operations (with keyboard shortcuts) that you could execute on a visually selected text? For the simplicity consider this simple piece: a b cd 1 p a b cd 2 y a b cd 3 t a b cd 4 h a b cd 5 o a b cd 6 n One specific question: is it possible to execute Python/shell ...

Textmate 'Go to symbol' equivalent for Vim

On Railcasts I have noticed a very interesting feature 'Go to symbol' window. It work like Command-T but shows available classes and methods in current file. How to get it in vim? ...

Is there a way to get v$y to not copy the newline character in Vim on Mac and Linux?

I've used the Windows version of Vim in the past, but am new to MacVim. In MacVim, when I switch to visual mode, use the $ motion (highlighting from my cursor to the end of the line), and yank, when I paste the copied content, it includes the carriage return, bumping everything after the paste point down to a new line. This behavio...

How to fold all occurrences of a regex in vim?

A colleague of mine is using a horrible source code editor that leaves strange comments all over the code. In Visual Studio, I created a macro, that simply folds all those comment blocks so I don't have to see them. Now I would like to do the very same thing in vim. This regex matches every one of those blocks: /^.*\/\* EasyCODE.*\(\(...

Vim: how to highlite folds with cursorline?

Is there a possibility to highlite current line with cursorline over folding highlite? ...

In vim, is there a way to set "very magic" permanently and globally?

I use "very magic" for regexp searches (i.e. /\v or %s/\v) but I wish I could set some option so I don't have to include \v anymore, anywhere. Is there a way to do this? ...

iterm vim colorscheme not working

When I run vim from the commandline in iterm, syntax highlighting doesn't seem to work locally. In vim for example I have installed a nice colour scheme that works quite well in MacVim but it would be great if in iterm it showed the same one. Any ideas how i can turn this on? This is the color scheme I'm trying to use http://www.vim....

Mode-local keybindings in ViM?

I've recently return to ViM, after several years in Emacs, and something I'm missing is the ability to set filetype-local keybindings: e.g. I want to make _ underline the current word in Markdown-type files, but do something completely different in, say, Python. Is there a way to do this other than just autocmds that override each othe...

VIM: Using custom functions as parameters for shell

I have the following code in a vim file that it's auto sourced when editing php files. But I can't make it work. "PHP config if !exists("g:addPath") let g:addPath = 1 let $PATH=$PATH.';C:\Program Files\Mozilla Firefox' endif function! MakeThisUrl() let s:url='http://localhost/' let s:url=s:url. expand('%') return s:url endfu...

Vim search and highlighting control from a script

I'm writing a script in which I want to control searches programmatically, and get them highlighted. The search() function results are not highlighted (I think), so using that function is not of use to me. What I want to do is use the 'normal /' command to search for a variable, but that doesn't seem to be straightforward. I can scrip...

Vim doesn't support unicode?

I'm trying to get the following into my .vimrc " Use the same symbols as TextMate for tabstops and EOLs set listchars=tab:▸\ ,eol:¬ Those lines are from here are worked perfectly in vim 7.2 I recently compiled and installed vim 7.3 and now those characters aren't understood by vim. Also: Ctrl+V then U in insert doesn't let me insert a...

VIM problems with erb files

Whenever I make a open or save and erb file. I get this error. No idea how to fix it Error detected while processing function <SNR>59_UpdateErrors..<SNR>59_CacheErrors..SyntaxCheckers_eruby_GetLocList..SyntasticMake: Line 20: E40: Can't open errorfile ~\AppData\Local\Temp\VIeF751.tmp ...

Vim: Recommendations for vimball plugins in pathogen

I plan to switch to vim 7.3 in the next days on my windows box - linux will soon follow. I also plan to switch my vim setup and let pathogen handle my plugins. I've googled but not yet found a solution how to handle plugins using vimball technique for setup. Any hints? ...