" The .vimrc of Emil Erlandsson " http://buglix.org/vimrc.html " Set the indent level set tabstop=2 " Always use spaces instead of tabs set expandtab " add comment set softtabstop=2 " add comment set shiftwidth=2 " add comment set autoindent " Display line numbers set number " have syntax highlighting in terminals which can display colours: if has('syntax') && (&t_Co > 2) syntax on endif " have command-line completion <Tab> (for filenames, help topics, option names) " first list the available options and complete the longest common part, then " have further <Tab>s cycle through the possibilities: set wildmode=list:longest,full " don't make it look like there are line breaks where there aren't: set nowrap " normally don't automatically format `text' as it is typed, IE only do this " with comments, at 79 characters: set formatoptions-=t set textwidth=79 " enable filetype detection: filetype on " for C-like programming, have automatic indentation: autocmd FileType c,cpp,slang set cindent " for actual C (not C++) programming where comments have explicit end " characters, if starting a new line in the middle of a comment automatically " insert the comment leader characters: autocmd FileType c set formatoptions+=ro " for Perl programming, have things in braces indenting themselves: autocmd FileType perl set smartindent " in makefiles, don't expand tabs to spaces, since actual tab characters are " needed, and have indentation at 8 chars to be sure that all indents are tabs " (despite the mappings later): autocmd FileType make set noexpandtab shiftwidth=8 " make searches case-insensitive, unless they contain upper-case letters: set ignorecase set smartcase " show the `best match so far' as search strings are typed: set incsearch " assume the /g flag on :s substitutions to replace all matches in a line: set gdefault " have <F1> prompt for a help topic, rather than displaying the introduction " page, and have it do this from any mode: nnoremap <F1> :help<Space> vmap <F1> <C-C><F1> omap <F1> <C-C><F1> map! <F1> <C-C><F1> " Add the backup feature set backup " Store all backup files at a specific location " For more information, read " :help 07.4 " :help 'backupdir' " :help backup :set backupdir=~/.editbackup if has("gui") if has("win32_gui") " Which font to use in GUI mode " set guifont=Terminal\ 10 else " Which font to use in GUI mode set guifont=Terminal\ 10 endif " Disable menu bar in GUI mode set guioptions-=m " Disable tool bar in GUI mode set guioptions-=T endif colorscheme nedit2