" Vim main configuration file. " Make sure Vim (and not Vi) settings are enabled. set nocompatible " Enable automatic filedection, plugin and indention load. filetype plugin indent on " Use utf-8 file encoding for all files. set fileencodings=utf-8 " Wrap text after 78 characters. set textwidth=78 " Set tabs to 4 spaces, use softtabs. set shiftwidth=4 set softtabstop=4 set expandtab " When < and > is used indent/deindent to the next shiftwidth boundary. set shiftround " Use the default value for real tabs. set tabstop=8 " Enable auto indention. set autoindent " Activate lines display. set number " Display the ruler. set ruler " Activate syntax folding. set foldmethod=syntax set foldcolumn=2 set foldlevel=99 " no folding at default " Use smartcase mode when searching; only check for case if the searched word " contains a capital character. set ignorecase set smartcase " Activate spell checking, use English as default. set spell set spelllang=en_us " When joining lines only add one space after a sentence. set nojoinspaces " Allow backspacing over autoindent, line breaks and insert mode starts. set backspace=indent,eol,start " Don't use any modelines. set nomodeline " When completing paths first use the longest path then display a list of all " possible files. set wildmode=longest,list " Visualize the line the cursor is currently in. set cursorline " Use a dark background. set background=dark " Use "," as my mapleader. let mapleader = "," let maplocalleader = "," " Disable Apple style movements in MacVim. if has("gui_macvim") let macvim_skip_cmd_opt_movement = 1 endif " Activate syntax coloring. syntax enable " Automatically save and the load the file state (stored in ~/.vim/view). autocmd BufWrite * mkview autocmd BufRead * loadview