summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 21659f0cf14ceeda84bf4bb742a9c6033a9262c5 (plain)
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
set nocompatible
set nu
set noet
set showcmd
set autoindent
set smartindent
set cursorline
set nocp
set showmatch
set foldmethod=indent
set completeopt=longest,menuone
set tabstop=2
set shiftwidth=2
set expandtab
set ruler
set ttyfast
set mouse=r
set bs=2
set ignorecase
set smartcase
syntax on
setlocal spell spelllang=en_us
set nospell

" color
if $TERM =~ "^rxvt" || $TERM =~ "256color$"
  set t_Co=256
  colorscheme pks256
else
  colorscheme default
endif

" bindings
nmap <C-t> :tabnew<CR>
nmap <C-a> :tabprevious<CR>
nmap <C-d> :tabnext<CR>
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>

" cursorline
autocmd InsertEnter * setlocal nocursorline
autocmd InsertLeave * setlocal cursorline

" relative numbers
function! NumberToggle()
  if(&relativenumber == 1)
    set number
  else
    set relativenumber
  endif
endfunc
nnoremap <C-n> :call NumberToggle()<cr>

" vundle
filetype off                   " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'SirVer/ultisnips'
Bundle 'Valloric/YouCompleteMe'
Bundle 'tpope/vim-fugitive'
Bundle 'docunext/closetag.vim'
Bundle 'vimwiki/vimwiki'
Bundle 'scrooloose/nerdcommenter'
Bundle 'scrooloose/nerdtree'
Bundle 'majutsushi/tagbar'
Bundle 'scrooloose/syntastic'
Bundle 'tpope/vim-surround'
filetype plugin indent on     " required!

" UltiSnips
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-i>"
let g:UltiSnipsJumpBackwardTrigger="<c-o>"

" syntastic
let g:syntastic_auto_loc_list=1
let g:syntastic_enable_signs=1