-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
executable file
·118 lines (85 loc) · 2.19 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
" Installing vim-plug if it's not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'jiangmiao/auto-pairs'
Plug 'ryanoasis/vim-devicons'
Plug 'mattn/emmet-vim'
"Trying to fix bad php support
Plug '2072/PHP-Indenting-for-VIm'
Plug 'StanAngeloff/php.vim'
Plug 'captbaritone/better-indent-support-for-php-with-html'
"jsx support
Plug 'pangloss/vim-javascript'
Plug 'editorconfig/editorconfig-vim'
Plug 'mxw/vim-jsx'
"blade syntax
Plug 'jwalton512/vim-blade'
"handlebars support for ember
Plug 'mustache/vim-mustache-handlebars'
"colorschemes
Plug 'morhetz/gruvbox'
call plug#end()
colorscheme gruvbox
set background=dark
" Enable syntax highlighting
syntax on
" Highlight current line
set cursorline
set encoding=UTF-8
" Don’t add empty newlines at the end of files
set binary
set noeol
" Show “invisible” characters
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
set list
" Enable line numbers
set number
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase
" Highlight dynamically as pattern is typed
set incsearch
" Enable mouse in all modes
set mouse=a
" Don’t reset cursor to start of line when moving around.
set nostartofline
" Show the current mode
set showmode
" Show the filename in the window titlebar
set title
" Show the (partial) command as it’s being typed
set showcmd
" Disable error bells
set noerrorbells
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" Editorconfig
let g:indent_style = 'space'
let g:indent_size = 4
let g:tab_width = 4
set ttimeout
set ttimeoutlen=250
set notimeout
set lazyredraw
set ttyfast
" Strip trailing whitespace (,ss)
function! StripWhitespace()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
let NERDTreeHijackNetrw = 0
let NERDTreeShowHidden = 1
"mappings
map <C-l> :NERDTreeToggle<CR>