vim

Adding a file to a project via project.vim

I'm using project.vim to manage a project, and I'm having trouble adding a file to the project. I read the documentation and it said to 'insert the filename into the project entry, then hit return on it'. From what I understand, a project entry is one of the sections in the project window that looks like... Header Files="Header File...

Mac Vim: How can I change the default text color to be green? Default font? Macvim manual?

I have installed MacVim but I cannot figure out how to do some formatting things. The screen shot below shows: the file class1.jak (custom file type I have defined) open in both macvim and vim the left one is macvim the right one is the terminal Here is what I would like to do: The default color of my terminal is green. I wou...

vimscript: How to detect if specific file exists

I'm looking for an elegant way in vimscript to check if file exists in the current directory in a function. I came up with this but not sure if that's the most elegant solution (I'll be setting vim option if it exists) - is there any way of not having to do another comparison of the filename - maybe use different vim built-in function(?...

Vim mapping ctrl-k

I use k to move cursor line down in a file. but i want to add that when i press ctrl-k, to move 7 lines down in a file. i have put this in my .vimrc file: nmap <c-k> 7k but what that does is move 7 lines down and then enter a spacebar. how do i stop it from entering the spacebar? ...

vim mapping ctrl-;

In my case the move-right button is ; I want ctrl-; to move the cursor 7 characters to the right. the below .vimrc mapping doesn't work: nmap <c-;> 7; what's wrong? ...

Find first non-matching line in VIM

It happens sometimes that I have to look into various log and trace files on Windows and generally I use for the purpose VIM. My problem though is that I still can't find any analog of grep -v inside of VIM: find in the buffer a line not matching given regular expression. E.g. log file is filled with lines which somewhere in a middle co...

How to create folders in Vim (by preference using NERDTree)?

I know how to create rename, delete and move files in NERDTree (just pressing m + a, d, or m). But I can't figure out how to create a folder. Does anybody know how to do this on NERDTree (or just in vim's native "way")? ...

Scrolling Vim relative to cursor, custom mapping

So I have read :help scroll-cursor and really like zz, which puts the line your cursor is on in the middle of your window. I'm looking for help to make a mapping that would perform similar to zz but puts the line my cursor is on at 20% of the window height (or 25%, 30% etc). Edit: Thanks to ZyX and Drasill, I was able to modify his ...

Macvim: horizontal scroll bar

Using macvim, which is awesome. However I would love to have some kind of horizontal scroll bar. Is this possible? ...

Making Viper state global

EmacsWiki says: There is a way to make Viper state and Viper insert state global, like in Vim (and probably vi). In Vim (and probably vi), you start in Normal Mode. You can switch buffer, and Vim stays in Normal Mode. Pressing “i” puts Vim in Insert Mode. Then if you switch buffers by clicking on another window, Vim stays in Insert M...

How do you automatically remove the preview window after autocompletion in Vim?

I'm using omnifunc=pythoncomplete. When autocompleting a word (e.g., os.), I get the list of eligible class members and functions, as expected, as well as a scratch buffer preview window with documentation about the selected member or function. This is great, but after selecting the function I want, the preview window remains. I can get ...

Incorrect syntax highlighting Vim (Actionscript 3)

The braces shown below after ...ret):String are incorrectly being highlighted as red I'm using the following syntax definition file for actionscript: http://www.vim.org/scripts/script.php?script_id=1061 2 Questions: Does anyone happen to know off-hand what causes this weird matching? Is there anyway of identifying the current sy...

Problem autoexecuting yuicompressor in Vim (executing it from any directory).

I made yuicompressor work from the command line. But the only thing I didn't understand from this tutorial is this part: You most install yuicompressor and make yuicompressor executable from any directory. How do I make it execute from any directory? ...

Vim: grep's wildcard doesn't work in windows

I try to use vim's internal grep with '**' wildcard as in the following command: grep "test" **\*.txt vim gives the following error: FINDSTR: Cannot open **\*.txt When I remove the '**' wildcard, the command works properly: grep "test" *.txt I changed the backslashes to forward slashes, but it didn't help neither: grep "test" *...

Show input keystrokes in Vim

When I installed Vim on Windows, it (specifically gVim) used to show to show me the keystrokes I am currently entering in the bottom right corner of the screen. But now I'm working with gVim on Linux, and it doesn't show me. Is there a setting (:set) I need to turn on to do this ? ...

Touch-typing capital letter identifiers

Hi all, About half year ago I decided to improve my programming efficiency, so I learned touch-typing and moved to Vim. All is fine and I feel myself much better than before. However there is a question that annoys me all that time: how should I touch-type IDENTIFIERS_WRITTEN_IN_CAPS? If I will use shifts by all rules, I would have to...

Is there any online text editor with Vim-like capabilities (modal editor)?

Is there a online text editor with Vim-like features (modal editor). Sometimes I want to code in public computers but is a little tedious to download my version of Vim every time (and the files). Any suggestions? ...

How can I map a key to execute a program, and show its output in GVim?

On my .gvimrc, I have the following line: map <f4> :!./%< On a source file, I have to press F4 and then enter, but it works correctly, shows the output, and hangs until I press enter again. If I change it for: map <f4> :!./%< <CR> It behaves shows the output, but doesn't wait until I press enter (and so the output becomes imposs...

gVim Portable plugins

Can someone give me a detailed instalation procedure for gVim Portable and important C++ and python development plugins ... like OmniCppComplete, NERDTree, supertab etc ... or better yet, a prebuilt version thx ...

How to use abbreviations in Vim with arguments?

In Vim, you can make it so each time you write "FF" on insert mode changes to some code by using: :iab FF for ( int i = 0 ; i < n ; i++ ) But is there any way to use this with arguments? Something like C's #defines, so if I write FF(e, 10) It becomes for ( int e = 0 ; e < 10 ; e++ ) ...