|
1
|
1 |
" An example for a vimrc file.
|
|
|
2 |
"
|
|
|
3 |
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
|
4 |
" Last change: 2000 Oct 14
|
|
|
5 |
"
|
|
|
6 |
" To use it, copy it to
|
|
|
7 |
" for Unix and OS/2: ~/.vimrc
|
|
|
8 |
" for Amiga: s:.vimrc
|
|
|
9 |
" for MS-DOS and Win32: $VIM\_vimrc
|
|
|
10 |
" for OpenVMS: sys$login:.vimrc
|
|
|
11 |
|
|
|
12 |
" Use Vim settings, rather then Vi settings (much better!).
|
|
|
13 |
" This must be first, because it changes other options as a side effect.
|
|
|
14 |
set nocompatible
|
|
|
15 |
|
|
|
16 |
set bs=2 " allow backspacing over everything in insert mode
|
|
|
17 |
set ai " always set autoindenting on
|
|
|
18 |
if has("vms")
|
|
|
19 |
set nobackup " do not keep a backup file, use versions instead
|
|
|
20 |
else
|
|
|
21 |
set backup " keep a backup file
|
|
|
22 |
endif
|
|
|
23 |
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
|
|
24 |
" than 50 lines of registers
|
|
|
25 |
set history=50 " keep 50 lines of command line history
|
|
|
26 |
set ruler " show the cursor position all the time
|
|
|
27 |
|
|
|
28 |
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
|
|
|
29 |
" let &guioptions = substitute(&guioptions, "t", "", "g")
|
|
|
30 |
|
|
|
31 |
" Don't use Ex mode, use Q for formatting
|
|
|
32 |
map Q gq
|
|
|
33 |
|
|
|
34 |
" Make p in Visual mode replace the selected text with the "" register.
|
|
|
35 |
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
|
|
|
36 |
|
|
|
37 |
" Switch syntax highlighting on, when the terminal has colors
|
|
|
38 |
" Also switch on highlighting the last used search pattern.
|
|
|
39 |
if &t_Co > 2 || has("gui_running")
|
|
|
40 |
syntax on
|
|
|
41 |
set hlsearch
|
|
|
42 |
endif
|
|
|
43 |
|
|
|
44 |
" Only do this part when compiled with support for autocommands.
|
|
|
45 |
if has("autocmd")
|
|
|
46 |
" In text files, always limit the width of text to 78 characters
|
|
|
47 |
autocmd BufRead *.txt set tw=78
|
|
|
48 |
endif " has("autocmd")
|
|
|
49 |
|
|
|
50 |
set encoding=utf8
|
|
|
51 |
set background=dark
|
|
|
52 |
set number
|
|
|
53 |
set hidden
|
|
|
54 |
colorscheme desert
|
|
|
55 |
set exrc
|
|
|
56 |
set secure
|
|
|
57 |
let g:proj_flags="imstbvSc"
|
|
|
58 |
nmap <silent> <Leader>p <Plug>ToggleProject
|
|
|
59 |
|