-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
143 lines (112 loc) · 3.16 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
filetype plugin indent on
set nowrap
set tabstop=2 shiftwidth=2
set expandtab
set backspace=indent,eol,start
set hlsearch
set incsearch
set ignorecase
set smartcase
set laststatus=2
let g:loaded_logipat = 1
let g:colorizer_auto_filetype = 'css,scss,html,less'
let mapleader = ' '
" save using inset mode
inoremap :w<CR> <ESC>:w<CR>a
" save and alter tab or close table
imap <Leader>bn <ESC>:w<CR><Leader>bn
imap <Leader>bp <ESC>:w<CR><Leader>bp
imap <Leader>bc <ESC>:w<CR><Leader>bc
" close or open nerdtree in insert mode
imap <Leader>nt <ESC><leader>nt<C-W>l:w<CR>a
" indent code whif visual mode
vmap <TAB> ><CR>gv
vmap <S-TAB> <<CR>gv
" reload document
nmap <F5> :e<CR>
" open nerd tree
nmap nt :NERDTreeToggle<CR>
" find file in nerd tree
nmap nf :NERDTreeFind<CR>
nmap gs :Gstatus<CR>
nmap <C-f> <Plug>CtrlSFPrompt
nmap <Leader>vs<CR> :vs<CR>
nmap <Leader>hs<CR> :sp<CR>
"configuration horizontal resize
nmap <Leader>max<CR> :res<Space>+200<CR>
nmap <Leader>min<CR> :res<Space>-200<CR>
" up
nmap <Leader>k :res<Space>+10<CR>
" down
nmap <Leader>j :res<Space>-10<CR>
" configuration vertical resize
nmap <Leader>vmax<CR> :vertical<Space>resize<Space>-200<CR>
nmap <Leader>vmin<CR> :vertical<Space>resize<Space>+200<CR>
" left
nmap <Leader>h :vertical<Space>resize<Space>-10<CR>
" rigth
nmap <Leader>l :vertical<Space>resize<Space>+10<CR>
" configuration doc php
nmap <Leader>doc :exec<Space>PhpDoc()<CR>''
" Buffer
nnoremap <Leader>bp :bprev<CR>
nnoremap <Leader>bn :bnext<CR>
" Buffer deleting
nnoremap <Leader>bc :BD<CR>
vnoremap // y/<C-R>"<CR>
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Plug auto-loading
Plug 'morhetz/gruvbox'
Plug 'tpope/vim-fugitive'
Plug 'mattn/emmet-vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-surround'
Plug 'dyng/ctrlsf.vim'
Plug 'lilydjwg/colorizer'
Plug 'terryma/vim-multiple-cursors'
Plug 'editorconfig/editorconfig-vim'
Plug 'taohex/lightline-buffer'
Plug 'qpkorr/vim-bufkill'
Plug 'tpope/vim-commentary'
Plug 'vim-scripts/PDV--phpDocumentor-for-Vim'
Plug 'jwalton512/vim-blade'
" Plug On-demand loading
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
" Initialize plugin system
call plug#end()
" Define colors
set t_Co=256
colorscheme gruvbox
set background=dark
" define commentari for smarty languagi
autocmd FileType smarty setlocal commentstring={*\ %s\ *}
" ligthLine Configuration
set hidden " allow buffer switching without saving
set showtabline=2 " always show tabline
" use lightline-buffer in lightline
let g:lightline = {
\ 'tabline': {
\ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
\ 'right': [ [ 'close' ], ],
\ },
\ 'component_expand': {
\ 'buffercurrent': 'lightline#buffer#buffercurrent2',
\ },
\ 'component_type': {
\ 'buffercurrent': 'tabsel',
\ },
\ 'component_function': {
\ 'bufferbefore': 'lightline#buffer#bufferbefore',
\ 'bufferafter': 'lightline#buffer#bufferafter',
\ 'bufferinfo': 'lightline#buffer#bufferinfo',
\ },
\ }
" inplement cab section
cab W w
cab Wq wq
cab WQ wq