Questions tagged [vim]

Vim is an open-source text editor with a steep learning curve that leads to high efficiency in many tasks related to text edition. If you wish to start with vim, try to run “vimtutor”, which will teach you basic commands.

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.

Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.

Visit the home page of vim or visit the Official Vim Tips Wiki.

95 questions
13
votes
1 answer

Configure vim for text selection with shift and copy/paste via ctrl+c, ctrl+v?

Many machines i need to work with have basic NIX installation with vim as text editor. But vim's way to select text is kind of unusual to me :). Is it any easy way to re-configure vim so it will use shift in order to select text and ctrl+c / ctrl+v…
grigoryvp
  • 3,795
6
votes
7 answers

Split vim window

How do I have vim and a console in the same window? For example, I am splitting up the vim window into multiple windows (vertically or horizontally). What I want is to have the code window on the left side, and the interpreter or console or whatever…
5
votes
4 answers

Change location _viminfo file on Windows

I use gvim 7.2 script dev and other admin work on a Windows XP laptop and it has picked my network share as the location of the _viminfo. This is problematic because it takes a long time for vim to start. Is there a way to change the location of…
bkoch
  • 239
3
votes
2 answers

Setting a default vim filetype for syntax highlighting

How do I tell vim to automatically use a particular filetype (usually for syntax highlighting) when none is detected?
MikeyB
  • 39,673
2
votes
2 answers

Scrolling? ~ Vim ex mode

Feel free to point me to the appropriate documentation for this. When in ex mode ( Q ) and entering numerous commands, the file scrolls up to where you can't see what you're working on. Are there key bindings for scrolling the visible file while in…
Bubnoff
  • 415
1
vote
1 answer

Vim Doesn't Source All Commands In auto-command Group

I have a vim auto-command group that looks like this: augroup filetypedetect_wiki au! au! FileType vimwiki iabbrev cfo %% TODO {{{1hhhhhhhhveh au! FileType vimwiki iabbrev cfc %% TODO }}}1hhhhhhhhveh au! FileType vimwiki…
Tom Purl
  • 549
1
vote
1 answer

vim uses /tmp for shell functions

When vim uses the shell given a colon !command, it does so through the /tmp filesystem. How do you force vim to use ~/.vim/tmp/ instead? It also uses /tmp for help files when zcat is required to read some of the manuals. TMPDIR doesn't work for this…
atx
  • 1,291
1
vote
3 answers

Change Vim configurable based on filetype

Is there a way where I can set vim to configure itself based on the filetype? So for example, text files have the equivalent of :set spell :syntax off Where a C source file has :syntax on :smartindent on Thanks for any help.
devin
  • 1,266
1
vote
2 answers

Display a summary of the scope context with vim

Let say I am working on a code which look like this, in C for example. function foo() { int a; int b; 15 kLoC for (int i = 0; i < n; i++) { 15 kLoC if (bar) { while (true) { **cursor is here** } } } } I…
Jérôme
  • 181
  • 2
  • 7
0
votes
2 answers

Can't open file /usr/share/vim/vim73/syntax/syntax.vim

Whenever I use vim command, I get this error: Error detected while processing /Users/boss/.vimrc: line 6: E484: Can't open file /usr/share/vim/vim73/syntax/syntax.vim Press ENTER or type command to continue Whenever I try to do an ls…
0
votes
3 answers

Managing different versions of VIM in unix

At my company, there are several linux boxes, each with various versions of VIM installed. On one box is version 7, the other is Tiny VIM 6. Tiny VIM doesn't have color and it annoys the heck out of me. I have root access but I am very new to bash…
Gary H
0
votes
3 answers

Unable to highlight all comments in Vim

Problem: Vim does not highlight all my comments apparently because of folds alt text http://files.getdropbox.com/u/175564/vim-color-problem.png Note the line 84 where the comment is not highlighted. I move my cursor up and down the same problem…
0
votes
3 answers

Unable to highlight an active eol character in Vim

I can change the eol character of all lines except the active one by hi nonText ctermfg=2 However, I do not know how to change the eol character of the line where my cursor is. How can you highlight the eol character of an active line?
0
votes
1 answer

Save buffer on exit from insert mode in Vim

Is there any way to map key to save buffer after exit from insert mode?
Ramesh
  • 1