-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
84 lines (67 loc) · 1.66 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
if has('win32')
let $MYVIM_ROOT=$HOME."/vimfiles"
elseif has('mac')
let $MYVIM_ROOT=$HOME."/.vim"
elseif has('unix')
let $MYVIM_ROOT=$HOME."/.vim"
end
if has("gui_running")
if has("gui_gtk2")
set guifont=Inconsolata\ 12
elseif has("gui_macvim")
set guifont=Menlo\ Regular:h14
elseif has("gui_win32")
set guifont=Consolas:h11:cANSI
endif
endif
set encoding=utf-8
" encoding
set fenc=utf-8
set fencs=utf-8,gb18030,gbk,gb2312,usc-bom,euc-jp,cp936
" set enc=utf-8
let &termencoding=&encoding
language messages zh_CN.utf-8
set t_Co=256
call pathogen#infect()
set nocompatible
syntax on
filetype on
filetype indent on
filetype plugin on
let NERDTreeDirArrows=0
let Tlist_Show_One_File = 1
let Tlist_Use_Right_Window = 1
" let NERDTreeDirArrows=0
let g:solarized_termcolors= 256
" let g:solarized_termtrans = 1
" let g:solarized_degrade = 1
" let g:solarized_bold = 1
" let g:solarized_underline = 1
" let g:solarized_italic = 1
" let g:solarized_contrast = "normal"
" let g:solarized_visibility= "normal"
set background=dark
colorscheme solarized
call togglebg#map("<F5>") " for solarized togglebg
set tabstop=4 shiftwidth=4 softtabstop=4
set expandtab
set autoindent
set number
set hlsearch
" set undofile
" set undodir=$MYVIM_ROOT/.undofiles
set mouse=nv
set mousehide
set ttymouse=xterm2
set ttyfast
let mapleader=","
let g:mapleader=","
" nmap <leader>ss :source ~/.vimrc<CR>
nmap <leader>n :NERDTreeToggle<CR>
nmap <leader>cw :cw<CR>
nmap <leader>tl :TlistOpen<CR>
" set textwidth=60
" set colorcolumn=+1,+21
let g:javascript_enable_domhtmlcss = 1
autocmd Filetype javascript setlocal ts=2 sts=2 sw=2
autocmd Filetype html setlocal ts=2 sts=2 sw=2