Last active
December 20, 2015 04:29
-
-
Save ironhouzi/6070843 to your computer and use it in GitHub Desktop.
Basic vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocp " use vim settings instead of vi - MUST BE 1ST LINE! | |
" set pathogen plugin which helps installing plugins and runtime files | |
execute pathogen#infect() | |
set encoding=utf-8 | |
set fileencoding=utf-8 | |
scriptencoding utf-8 | |
let mapleader = "," | |
syntax on " enable syntax highlighting | |
set showcmd " display incomplete commands | |
filetype plugin indent on " load file type plugins + indentation | |
set nowrap | |
set hls | |
set number | |
set wm=2 | |
set backspace=indent,eol,start " backspace through everything in insert mode | |
set ignorecase " searches are case insensitive... | |
set smartcase " ... unless they contain at least one capital letter | |
set hidden " for troubleshooting: http://vim.wikia.com/wiki/Troubleshooting#vimrc | |
set modeline | |
"set sidescroll=3 | |
"set listchars+=precedes:<,extends:> | |
" | |
set autoindent " indent at the same level of the previous line | |
set nosmartindent | |
set nomodeline | |
set wildmenu " tab completion | |
set pastetoggle=<F12> " pastetoggle (sane indentation on pastes) | |
set scrolloff=5 " scrolls 5 lines before reaching the very top or bottom | |
set sidescroll=2 " only scroll horizontally little by little | |
set ttyfast " improves redrawing for newer computers | |
set tabstop=4 " tabs are 4 characters long | |
set shiftwidth=4 " < and > use indents of 4 spaces | |
set softtabstop=4 " let backspace delete indent | |
set expandtab " tabs are spaces, not tabs | |
set incsearch " highlights searches for efficient movement | |
" Different settings for html files | |
autocmd FileType html,xml :setlocal sw=2 ts=2 sts=2 | |
autocmd FileType python :setlocal ts=8 et sw=4 sts=4 | |
" --------------------------------------- | |
" stop creation of files with ~ extension | |
" --------------------------------------- | |
set backupdir-=. " stop saving backups in local dir | |
set backupdir^=~/tmp,/tmp | |
set directory=~/tmp//,. " set swapfile dir | |
" --------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment