-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
93 lines (85 loc) · 2.53 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
85
86
87
88
89
90
91
92
93
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'altercation/vim-colors-solarized'
Bundle 'kien/ctrlp.vim'
Bundle "pangloss/vim-javascript"
if v:version > 730
Bundle 'Valloric/YouCompleteMe'
endif
set hidden
syntax enable
colorscheme solarized
set guifont=Menlo:h14
set nowrap " don't wrap lines
set tabstop=2 " a tab is four spaces
set backspace=indent,eol,start
" allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set autoread
set number " always show line numbers
set shiftwidth=2 " number of spaces to use for autoindenting
set expandtab
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
" case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to
" shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set nobackup
set noswapfile
set spell
filetype plugin indent on
autocmd filetype python set expandtab
set list
set listchars=tab:▸\ ,eol:¬
"map <up> ddkP
"map <down> ddp
"map <left> :tabp<CR>
"map <right> :tabn<CR>
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
nnoremap j gj
nnoremap k gk
nnoremap ; :
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\stage$\|doc/build$\|CMakeFiles$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$\$',
\ }
let g:ctrlp_max_files = 10000
if has("unix")
let g:ctrlp_user_command = {
\ 'types' : { 1 : ['.git', 'cd %s && git ls-files'] },
\ 'fallback' : 'find %s -type f | head -' . g:ctrlp_max_files
\ }
endif
set mouse=a
let mapleader = ","
nmap <leader>v :tabedit $MYVIMRC<CR>
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
endif
set laststatus=2
inoremap <left> <nop>
inoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap jk <esc>
inoremap <esc> <nop>
set scrolloff=8
set sidescroll=1
nmap <LEADER>c :let @/=''<CR>