-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
76 lines (51 loc) · 1.57 KB
/
init.vim
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
set tabstop=4
set shiftwidth=4
set expandtab
let mapleader = ","
let @s = "Oc()hpl%"
" set the current directory to the one of the current file
nnoremap <leader> :lcd %:h
"inserts ', ' between words inside selection
vnoremap <leader>, :s/\%V \+/, /g
" encloses the selection with ()
vnoremap <leader>( c()hpl%
" encloses the selection with {}
vnoremap <leader>{ c{}hpl%
" encloses the selection with <>
vnoremap <leader>< c<>hpl%
" encloses the selection with []
vnoremap <leader>[ c[]hpl%
" encloses the selection with ""
nnoremap <leader>m ciw""hplw
" encloses the selection with ''
nnoremap <leader>r ciw''hplw
" beautify code
nnoremap <leader>b :'<,'>s/\v *([-+*/%!&><,;=\|]+) */ \1 /g
" terminal escape
tnoremap <Esc> <C-\><C-n>
" navigating windows with alt+[h|j|k|l]
tnoremap <C-j> <C-\><C-N><C-w>w
tnoremap <C-k> <C-\><C-N><C-w>W
inoremap <C-j> <C-\><C-N><C-w>w
inoremap <C-k> <C-\><C-N><C-w>W
nnoremap <C-j> <C-w>w
nnoremap <C-k> <C-w>W
" navigating throug tabs with ctrl+[h|l]
nnoremap <C-h> gT
nnoremap <C-l> gt
" moving tabs with Ctrl+[h|l]
nnoremap <C-y> :tabmove -
nnoremap <C-o> :tabmove -
" create new tab
nnoremap <leader>tn :tabnew
nnoremap <leader>tc :tabclose
"
" fast down (Ctrl+d) to Ctrl+i
nnoremap <C-i> <C-d>zz
nnoremap <C-u> <C-u>zz
let g:python3_host_prog = 'c:\Program Files\Python36\python'
call plug#begin('c:/Neovim/nvim/plugins')
Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}
Plug 'tpope/vim-fugitive'
call plug#end()
let g:deoplete#enable_ar_strartup = 1