-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
executable file
·122 lines (101 loc) · 2.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
set nocompatible
"--- use pathogen ---
execute pathogen#infect()
"--- add fzf to runtime path ---
set rtp+=~/.fzf
"--- disable mouse
set mouse=
"--- various options ---
set history=200
set ruler
set showcmd
set number
set scrolljump=8
set scrolloff=8
set dir=/tmp
set novisualbell
set t_vb=
set termencoding=utf-8
set fileencodings=utf-8
set hidden
set backspace=indent,eol,start whichwrap+=<,>,[,]
set expandtab
set statusline=%<%f%h%m%r\ \x%02B\ %{&encoding}\ 0x\ \ %l,%c%V\ %P
set laststatus=2
set sessionoptions=curdir,buffers,tabpages
set tags+=~/.vim/tags/*/tags
"--- indentation options ---
set shiftwidth=4
set softtabstop=4
set tabstop=4
set autoindent
set smartindent
"--- color options ---
colorscheme kolor
"--- gui options ---
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guifont=Consolas\ 13
"--- wildcard options ---
set wildmenu
set wcm=<Tab>
"--- syntax highlight options ---
au BufNewFile,BufRead *.qml set filetype=qml
let g:loaded_matchparen=1
syntax on
"--- plugin shortcuts ---
nmap <F9> :TagbarToggle<CR>
nmap <C-\> :tselect<CR>
nmap <C-t> :Files<CR>
noremap <silent> <F10> :Buffer<CR>
noremap <silent> <m-F10> :BufExplorerHorizontalSplit<CR>
noremap <silent> <c-F10> :BufExplorerVerticalSplit<CR>
"--- plugin options ---
filetype plugin on
filetype indent on
"--- various shortcuts ---
let mapleader = ","
set incsearch
set hlsearch
nmap \q :nohlsearch<CR>
nmap \o :set paste!<CR>
map <leader>s :vsplit<CR>
imap <S-Insert> <MiddleMouse>
nmap ; :%s/\<<c-r>=expand("<cword>")<cr>\>/
vmap < <gv
vmap > >gv
imap <Ins> <Esc>wq
"--- nerdtree options ---
:nmap \l :NERDTreeToggle<CR>
let g:NERDTreeWinSize = 45
let g:NERDTreeWinPos = "right"
"--- autotag options ---
let g:autotagCtagsArgs = "--c++-kinds=+p --fields=+iaS --extra=+q"
"--- flake8 options ---
let g:flake8_cmd="/usr/bin/flake8-2"
"--- screen ctrl+arrow fix ---
if &term =~ '^screen'
execute "set <xUp>=\e[1;*A"
execute "set <xDown>=\e[1;*B"
execute "set <xRight>=\e[1;*C"
execute "set <xLeft>=\e[1;*D"
endif
"--- supertab options ---
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"
"--- crontab fix for os x ---
autocmd filetype crontab setlocal nobackup nowritebackup
"--- fix autoreload for nvim ---
autocmd FocusGained * checktime
"--- per filetype options ---
au FileType yaml setl sw=2 sts=2 ts=2 et
au FileType c,h,cpp setl sw=2 sts=2 ts=2 et
au BufNewFile,BufRead *.js, *.html, *.css setl sw=2 sts=2 ts=2 et
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix