summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 284ca844e5816709e3493eeb1cbf36af9b259b74 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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
set laststatus=2

" 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'
Plugin 'tpope/vim-endwise'
Plugin 'vim-ruby/vim-ruby'
Plugin 'bling/vim-airline'
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

" airline
let g:airline_theme             = 'pks256'
let g:airline_powerline_fonts   = 1
"let g:airline_enable_branch     = 1
"let g:airline_enable_syntastic  = 1
"let g:airline_left_sep          = ''
"let g:airline_left_alt_sep      = ''
"let g:airline_right_sep         = ''
"let g:airline_right_alt_sep     = ''
"let g:airline_branch_prefix     = ''
"let g:airline_readonly_symbol   = ''
"let g:airline_linecolumn_prefix = ''

" vimwiki
let g:vimwiki_list = [{'path':'~/var/wiki', 'path_html':'~/var/wiki/html/'}]