-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
63 lines (53 loc) · 1.23 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
call plug#begin('~/.vim/pluged')
Plug 'StanAngeloff/php.vim'
Plug 'mattn/emmet-vim'
Plug 'patstockwell/vim-monokai-tasty'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-liquid'
Plug 'lumiliet/vim-twig'
call plug#end()
" Colorscheme setting
colorscheme vim-monokai-tasty
let g:lightline = { 'colorscheme': 'monokai_tasty' } " lightline theme
set tabstop=4
set softtabstop=4
set expandtab
set shiftwidth=4
set number
set mouse=a
" Delete the current line"
nmap - dd
" To save with simply Ctrl+s
nmap <c-s> :w<CR>
imap <c-s> <Esc>:w<CR>a
" DIY autoclosing
inoremap (; ();<left><left>
inoremap [; [];<left><left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap {<cr> {<cr>}<esc>O
inoremap (<cr> (<cr>)<esc>O
inoremap [<cr> [<cr>]<esc>O
inoremap " ""<left>
inoremap ' ''<left>
inoremap ` ``<left>
inoremap <? <?php<Space>
inoremap <?= <?php echo<Space>
" Alt j/k to move to the tab to the left/right
noremap <A-j> gT
noremap <A-k> gt
" Layouting
set laststatus=2
set statusline=
set statusline+=%-3.3n\
set statusline+=%f\
set statusline+=%h%m%r%w
set statusline+=\[%{strlen(&ft)?&ft:'none'}]
set statusline+=%=
" Show autocomplete menus
set wildmenu
" Show editing mode
set showmode
" Don't write swap file
set noswapfile