-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc_custom
More file actions
102 lines (83 loc) · 2.68 KB
/
vimrc_custom
File metadata and controls
102 lines (83 loc) · 2.68 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
" ===================== CONFIG ===========================
" GUI setting
if has("gui_running")
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set guioptions=c
set guifont=Hack:h14
set lines=40 columns=120
set cursorline " 強調當前行
try
colorscheme solarized
catch /^Vim\%((\a\+)\)\=:E185/
colorscheme desert
endtry
endif " has("gun_running")
" Interface setting
syntax on " syntax highlight
set background=dark " 背景顏色
set relativenumber " 顯示行數
set number " 顯示行數
highlight clear SignColumn " sign column 背景低亮度
" Tab setting
set tabstop=4 " 縮排寬度
set softtabstop=4
set shiftwidth=4
set expandtab " 以空白取代Tab
" Search setting
set hlsearch " 高亮搜尋
set incsearch " 預先搜尋
set ignorecase " 搜尋忽視大小寫
set smartcase " ignore case if search pattern is all lowercase,case-sensitive otherwise
" Indent
set smartindent " 聰明版自動縮排
set copyindent
set cindent
" Split
set splitbelow
set splitright
" no beeping
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
" Other
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set history=100 " keep 50 lines of command line history
set mouse=nv " set mouse on n and v mode work
" ===================== MAPPING ===========================
" my map leader :D
let mapleader = ","
" Moving around windows
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
" clear highlight
nmap <leader>/ :nohlsearch<CR>
" paste
nmap <leader>p "+p
" ===================== PLUGINS ===========================
" nerdtree-tabs
let g:nerdtree_tabs_open_on_gui_startup=0
let NERDTreeHijackNetrw=0 " let vim-vaingar '-' is working :)
nnoremap <silent> <leader>t :NERDTreeMirrorToggle<CR>
let NERDTreeQuitOnOpen=1
" syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_loc_list_height = 3
" tagsbar
" nnoremap <silent> <leader>c :TagbarToggle<CR>
" emmet
let g:user_emmet_mode='nv'
let g:user_emmet_leader_key='m'
let g:user_emmet_install_global=0
autocmd FileType html,css,php EmmetInstall
" laravel
ab lgm !php artisan generate:model
ab lgc !php artisan generate:controller
ab lgmig !php artisan generate:migration
" reload config
ab vimconfig tabnew ~/.vim/vimrc_custom
ab vimvundle tabnew ~/.vim/vimrc_vundle