-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
163 lines (133 loc) · 3.6 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
set shell=bash
set nocompatible
filetype off
set t_Co=256
" molokai theme config
let g:rehash256 = 1
" airline config
let g:airline_theme = 'powerlineish'
let g:airline_enable_branch = 1
let g:airline_powerline_fonts = 0
let g:airline#extensions#bufferline#enabled = 1
let g:airline#extensions#tabline#enabled = 0
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_left_alt_sep = '|'
let g:airline_right_alt_sep = '|'
let g:airline_enable_syntastic = 1
" let g:airline#extensions#tabline#enabled = 1
" let g:airline#extensions#tabline#left_sep = ' '
" let g:airline#extensions#tabline#left_alt_sep = '|'
" Plugins from Vundle (:BundleInstall)
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
Bundle 'gmarik/vundle'
" Bundle 'git://git.wincent.com/command-t.git'
Bundle 'tomtom/tcomment_vim'
Bundle 'scrooloose/nerdtree'
Bundle 'jcf/vim-latex.git'
Bundle 'git://github.com/majutsushi/tagbar.git'
Bundle 'bling/vim-airline'
Bundle 'tkztmk/vim-vala'
Bundle 'digitaltoad/vim-jade'
Bundle 'tomasr/molokai'
" Bundle 'altercation/vim-colors-solarized'
Bundle 'ciaranm/detectindent'
Bundle 'scrooloose/syntastic'
" Bundle 'evidens/vim-twig'
" Bundle 'marijnh/tern_for_vim'
" Bundle 'skammer/vim-css-color'
Bundle 'kien/ctrlp.vim'
" Bundle 'fatih/vim-go'
set background=dark
colorscheme molokai
let mapleader=','
let maplocalleader=','
set laststatus=2
let g:ctrlp_map = '<c-s-x>'
" map <c-s-x> :CtrlPBuffer<CR>
let g:tagbar_ctags_bin = "anjuta-tags"
set wildignore+=*/build/*,*.in
filetype plugin on
filetype plugin indent on
syntax enable
autocmd BufReadPost * :DetectIndent
au BufRead,BufNewFile *.md set filetype=markdown
set completeopt-=preview
" some default settings
set backspace=indent,eol,start
set shiftwidth=4
set tabstop=4
set nobackup
set history=50
set ruler
set showcmd
set incsearch
set nu
set hlsearch
set dir=~/.vim/tmp//
set smartcase
set scrolloff=10
" code folding
set foldmethod=indent
set foldnestmax=10
set nofoldenable
set foldlevel=1
" go stuff
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gb <Plug>(go-doc-browser)
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
" tComment
map <Leader>c <c-_><c-_>
" give us NERDTree
map <F2> :NERDTree<CR>
" open the Tagbar
nmap <F8> :TagbarToggle<CR>
" if we press escape and then O for example, don't wait that long for an
" escape sequence
set ttimeoutlen=100
" Vala related stuff
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
au BufRead,BufNewFile *.vala,*.vapi setfiletype vala
" Syntastic config
let g:syntastic_always_populate_loc_list=1
let g:syntastic_error_symbol='✗'
let g:syntastic_warning_symbol='⚠'
let g:syntastic_style_error_symbol = '✗'
let g:syntastic_style_warning_symbol = '⚠'
let g:syntastic_auto_loc_list=1
let g:syntastic_aggregate_errors = 1
" save as root
command W w !sudo tee % >/dev/null
" Get us a mouse
if has('mouse')
set mouse=a
endif
" Reopen at last position if possible
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
" gui settings
set guioptions-=M
set guioptions-=T
set guioptions-=R
set guioptions-=L
set guioptions-=b
" latex
set grepprg=grep\ -nH\ $*
let g:tex_flavor='latex'
let g:Tex_DefaultTargetFormat='pdf'
" experiments
nnoremap - ddp
nnoremap + ddP
inoremap jk <esc>
" inoremap <esc> <nop>
nnoremap ö :tabn<CR>
nnoremap ä <c-w>w
map <del> <nop>
nnoremap ü ]
nnoremap üü [
" Syntastic for js
let g:syntastic_javascript_checkers = ['jsl']
let g:syntastic_javascript_jsl_args = "-conf /etc/jsl.conf"