-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
executable file
·69 lines (58 loc) · 1.24 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
" global
let mapleader = ' '
syntax enable
set hidden
set number
set showmatch
set hlsearch
set ignorecase
set smartcase
set ruler
set background=dark
colorscheme solarized
" memory
set history=1000
set undolevels=1000
set maxmem=2000000
set maxmemtot=2000000
" encoding
set ffs=unix
set enc=utf-8
" indentation
set autoindent
set smartindent
set nowrap
" tabs
set softtabstop=4
set shiftwidth=4
set expandtab
set shiftround
" completion
set wildmenu
set wildmode=list:longest
" switch between vertical splits
map <Tab> <C-w>
" nerd_commenter
filetype plugin on
map <C-c> <leader>c<space>
" fuzzyfinder
noremap <unique> <S-f> :FufFile<CR>
" backup/swap
set backup
set writebackup
set backupdir=~/.vim/backup//
set directory=~/.vim/swap//
" remove trailing whitespaces
autocmd BufWrite * silent! %s/s+$//
autocmd BufWrite !Makefile :%s/ / /g
" syntax
if !exists("autocommands_loaded")
let autocommands_loaded = 1
au BufNewFile,BufRead *.php set ft=php
au BufNewFile,BufRead Makefile set noexpandtab
au BufNewFile,BufRead *.as set ft=actionscript
au BufNewFile,BufRead *.mxmlc set ft=mxmlc
au BufNewFile,BufRead *.json set ft=json
au BufNewFile,BufRead *.js set ft=javascript
au BufNewFile,BufRead *.xml set ft=xml
endif