1 " The .vimrc of Emil Erlandsson 2 " http://buglix.org/vimrc.html 3 " 4 " 2006-07-02 - Added support for MS style copy/cut/paste 5 " - Changed color scheme to Chela Light from fruity. 6 " - Changed option syntax to always on 7 8 " Set the indent level 9 set tabstop=2 10 " Always use spaces instead of tabs 11 set expandtab 12 " add comment 13 set softtabstop=2 14 " add comment 15 set shiftwidth=2 16 " add comment 17 set autoindent 18 " Display line numbers 19 set number 20 21 syntax on 22 23 " have command-line completion <Tab> (for filenames, help topics, option names) 24 " first list the available options and complete the longest common part, then 25 " have further <Tab>s cycle through the possibilities: 26 set wildmode=list:longest,full 27 28 " don't make it look like there are line breaks where there aren't: 29 set nowrap 30 31 " normally don't automatically format `text' as it is typed, IE only do this 32 " with comments, at 79 characters: 33 set formatoptions-=t 34 set textwidth=79 35 36 " enable filetype detection: 37 filetype on 38 39 " for C-like programming, have automatic indentation: 40 autocmd FileType c,cpp,slang set cindent 41 42 " for actual C (not C++) programming where comments have explicit end 43 " characters, if starting a new line in the middle of a comment automatically 44 " insert the comment leader characters: 45 autocmd FileType c set formatoptions+=ro 46 47 " for Perl programming, have things in braces indenting themselves: 48 autocmd FileType perl set smartindent 49 50 " in makefiles, don't expand tabs to spaces, since actual tab characters are 51 " needed, and have indentation at 8 chars to be sure that all indents are tabs 52 " (despite the mappings later): 53 autocmd FileType make set noexpandtab shiftwidth=8 54 55 " make searches case-insensitive, unless they contain upper-case letters: 56 set ignorecase 57 set smartcase 58 59 " show the `best match so far' as search strings are typed: 60 set incsearch 61 62 " assume the /g flag on :s substitutions to replace all matches in a line: 63 set gdefault 64 65 " have <F1> prompt for a help topic, rather than displaying the introduction 66 " page, and have it do this from any mode: 67 nnoremap <F1> :help<Space> 68 vmap <F1> <C-C><F1> 69 omap <F1> <C-C><F1> 70 map! <F1> <C-C><F1> 71 72 " Add the backup feature 73 set backup 74 75 " Store all backup files at a specific location 76 " For more information, read 77 " :help 07.4 78 " :help 'backupdir' 79 " :help backup 80 :set backupdir=~/.editbackup 81 82 if has("gui") 83 "set guifont=Terminal\ 10 84 set guifont=MonteCarlo\ 10 85 86 " Disable tool bar in GUI mode 87 set guioptions-=T 88 89 colorscheme chela_light 90 91 " For CTRL+c style copy/paste 92 source $VIMRUNTIME/mswin.vim 93 endif