-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
61 lines (56 loc) · 1.47 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
" Theme
let g:rehash256 = 1
color molokai
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'jiangmiao/auto-pairs'
Plugin 'fatih/vim-go'
Plugin 'mattn/emmet-vim'
Plugin 'posva/vim-vue'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-commentary'
Plugin 'Vimjas/vim-python-pep8-indent'
Plugin 'vim-airline/vim-airline'
Bundle "https://github.com/keith/swift.vim.git"
Bundle "https://github.com/majutsushi/tagbar.git"
Bundle "https://github.com/tpope/vim-endwise.git"
call vundle#end()
filetype plugin indent on
" Settings
" about tab and spaces
set autoindent " set ai
set expandtab
set shiftwidth=4 " indent size
set tabstop=4 " when a tab is pressed
set softtabstop=4
set smartindent
" about search
set hlsearch
set ignorecase
set incsearch " go to match pattern as soon as there is a match
" about display
set cursorline
set number " set nu
set ruler
set showcmd
set colorcolumn=80
set t_Co=256
set backspace=indent,eol,start
set linebreak
set foldmethod=syntax
set foldlevel=5
syntax on
autocmd Filetype ruby setlocal ts=2 sw=2 softtabstop=2 expandtab
au BufNewFile,BufRead *.cu set ft=cuda
au BufNewFile,BufRead *.cuh set ft=cuda
au BufRead,BufNewFile *.vue setlocal ts=2 sw=2 softtabstop=2 expandtab
au Filetype javascript setlocal ts=2 sw=2 softtabstop=2 expandtab
" Key Mapping
nnoremap <c-n> :noh<return><esc>
nnoremap <c-l> :tabn<CR>
nnoremap <c-h> :tabp<CR>