forked from seocam/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
117 lines (88 loc) · 2.69 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
" Load Pathogen
execute pathogen#infect()
" Use Vim settings, rather then Vi settings (much better!).
" set nocompatible"
" Set wrap to things that make sense"
set wrap linebreak nolist
" Set background type"
set background=dark
"color scheme"
" colorscheme elflord
" colorscheme delek
" colorscheme desert
" colorscheme default
colorscheme PaperColor
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" showmatch: Show the matching bracket for the last ')'?
set showmatch
" highlight strings inside C comments
let c_comment_strings=1
"color syntax"
syn on
set encoding=UTF-8
" status line
"set statusline=%(%F%m%r%h%w\ [%Y]\ %{&encoding}\ %)%=%(%l,%v\ %LL\ %p%%%)
set laststatus=2
set linespace=0
"let g:airline_theme = 'badwolf'
let g:airline_theme = 'wombatseocam'
let g:airline_powerline_fonts = 1
let g:airline#extensions#hunks#enabled = 0
let g:airline#extensions#branch#enabled = 1
" tablines are cool but are degrading performance
"let g:airline#extensions#tabline#enabled = 1
" Keep git sign column as default (+, -, ~, etc.)
"let g:gitgutter_override_sign_column_highlight = 0
let g:gitgutter_max_signs = 10000
" Change line number color
" (by default gitgutter uses same color as LineNr)
highlight LineNr ctermbg=235
" set number"
set number
"tab config"
set ts=4
set expandtab
set softtabstop=4
" 4 spaces for indenting
set shiftwidth=4
"Disable autoindentation"
set noai
" Enable filetype plugins "
filetype plugin on
" Disable preview code when using omni complete"
set completeopt=menu
" Allow modelines"
set modelines=1
set spelllang=en,pt_br
" vim markdown settings
let g:vim_markdown_folding_disabled=1
" force vim to use 265 colors
set term=screen-256color
" remove trailing spaces for certain file types
autocmd FileType python,javascript,ruby,c,cpp,java,php autocmd BufWritePre <buffer> :%s/\s\+$//e
"------------ Mappings --------------"
"+ and - to resize splited windows"
map - <C-W>-
map = <C-W>+
" nnoremap <Leader>b :bp<CR>"
" nnoremap <Leader>f :bn<CR>"
" Makes Ctrl-P plugin ignore .git and everything on .gitignore "
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Let Ctrl-P open buffers:
" Where:
" i - all files as hidden buffers.
" j - after opening, jump to the first opened tab or window.
" Source: http://stackoverflow.com/questions/33315406/open-all-selected-files-as-hidden-buffer
let g:ctrlp_open_multiple_files = 'ij'
" For some reason home and end keys are not mapping properly."
" Home key"
imap <esc>OH <esc>0i
cmap <esc>OH <home>
nmap <esc>OH 0
" End key"
nmap <esc>OF $
imap <esc>OF <esc>$a
cmap <esc>OF <end>
" Required to make highlight work for JSX with pure JS
let g:jsx_ext_required = 0