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.

learn more… | top users | synonyms

7
votes
2answers
2k views

How do I keep 10 lines visible when scrolling up to EOF with CRTL-F?

I am used to using vi, not vim. What I find annoying in vim is that when you are scrolling with CTRL-F and reach EOF, vim scrolls down to the very last line and put this line on the top of your ...
1
vote
1answer
614 views

Problems with vim/locale as non-root user on Solaris

I do some work on a Solaris 10 machine, and my .vimrc is set up to show unicode characters for tabs and line endings: set listchars=tab:▸\ ,eol:¬ This works out of the box on my OS X machine. On ...
1
vote
3answers
89 views

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 ...
1
vote
2answers
139 views

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) { ...
0
votes
2answers
233 views

re: UTF-8, PHP and XML Mysql

This is relating to http://stackoverflow.com/questions/1791082/utf-8-php-and-xml-mysql, which I am still trying to get my head around. I Have a couple of separate questions that will hopefully help ...
6
votes
7answers
2k views

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 ...
17
votes
4answers
11k views

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users? Edit: I am using CentOS
0
votes
2answers
860 views

Auto Recovery and Deletion of VIM .swp Files

So, if I have a screen session with maybe 15 files open, in about 10 instances of VIM, and my landlord yanks my power ... Can I load everything up and recover the swp files, and delete them after in ...
0
votes
3answers
229 views

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 ...
1
vote
3answers
2k views

Vim keyboard remap on Snow Leopard (MacOs 10.6)

I want to have my external keyboard's HOME, END, PAGEDOWN and PAGEUP Working on Leopard's Terminal. So that I changed in Terminal > File > Preferences: Home: \033[H End: \033[F PageUp: \033[5~ ...
10
votes
1answer
2k views

How to tell if I'm in MacVim in .vimrc

In my .vimrc, I want to check if I'm in MacVim vs. regular vim so I can optionally set some MacVim-specific settings, which should not be applied to regular vim. How do I do this?
1
vote
5answers
669 views

Vim Configuration for Server-Side Editing

I always use Vim on our servers (mostly Ubuntu based) and I always lack a good configuration that suits vim over SSH without too much frills. I'd like to gather as much as possible configuration ...
2
votes
3answers
2k views

VI Editor on Ubuntu using VIM Short Cuts?

I installed Ubuntu and I tried to use the terminal's vi editor. The editor is using a different set of short cut keys that I'm not familiar with. Someone told me it's probably using the VIM short ...
9
votes
4answers
2k views

Windows Powershell Vim Keybindings

Is there a way to get vim keybindings in powershell as you would in bash or zsh with a command like set -o vi
1
vote
3answers
264 views

Unable to find the right fileformat for Screen's logs in Vim

I see where I have ^M and ^[ at various places. The former seems to be enter, while the latter apparently the end/beginning of the line. I would like to get the purple symbols out such that I can ...
0
votes
2answers
240 views

Unable find the right encoding for a HTML -file in Vim

I see where all contents is in one line. It seems that this is the reason of bad encoding. I can see the characters ^M. How can you get the encoding right in Vim?
0
votes
3answers
378 views

Unable to highlight all comments in Vim

Problem: Vim does not highlight all my comments apparently because of folds Note the line 84 where the comment is not highlighted. I move my cursor up and down the same problem continues. I am not ...
13
votes
4answers
3k views

Save file after forgetting to open as root / sudo vi [duplicate]

Possible Duplicate: vim re-edit as root I could have sworn I saw this question asked. But after looking though every search result for "vi" I'm stumped/lazy. I've opened a file, made an edit ...
5
votes
3answers
3k views

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 ...
21
votes
10answers
5k views

How to bring .vimrc around when I SSH?

My work tends to involves using SSH to connect to various machines, and then using vim to edit files on those machines. The problem is that I have to constantly copy my .vimrc file around. It's very ...
0
votes
2answers
501 views

vim syntax files under windows vista+?

In *nix, vim syntax files are in ~/.vim/syntax/[language].vim But on windows dot is not a welcome folder name start, so it suppose to be _vim\syntax\[language].vim I have tried putting language files ...
3
votes
1answer
864 views

Can vim execute buffer without addons?

If editing some script in vim, a file with .py or .sh extension, is it any build-in vim command that allows to run such file? I know it's a lot of IDE-like addons for VIM that allows to execute files ...
10
votes
1answer
3k views

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 ...
5
votes
6answers
3k views

How do you use VIM to edit tabular data (tables)? Specifically, BIND (named) DNS db files

I'm usually a purist when it comes to vimming. I don't like remapping keys, or learning to rely on a bunch of plugins. I like to feel just as powerful on foreign boxen as I do on my own dev box. I do, ...
22
votes
4answers
5k views

vim re-edit as root

I often open a file in vim, make some changes and when it's time to save the file is read-only.. (owned by another user). I'm looking for tips on how I could re-open the file as root and keep my ...
0
votes
3answers
299 views

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 ...
1
vote
4answers
465 views

Unable to grep sourced Files in Vim

I have files which I source in my files. I want to search them, when I am at a file which have these sources. I run unsuccessfully !bufdo grep source and !bufdo grep source % Example of ...
3
votes
13answers
933 views

Vim features and extension that make your work easier [closed]

What Vim features and extension do you use? Which would you recommend for a Linux sysadmin?
1
vote
4answers
152 views

What $TERM value can you use on a Nokia N810 so Vim's key mappings work properly?

I'm connected to a Nokia N810 Internet Tablet through ssh. The default $TERM value is 'xterm' which causes all sorts of key bindings messes in Vim. Specifically the arrow keys, and home/end keys print ...