-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
96 lines (83 loc) · 2.42 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
"filetype off
call plug#begin('~/.config/nvim/plugged')
" plugin list
"Plug 'VundleVim/Vundle.vim'
Plug 'vim-airline/vim-airline'
Plug 'scrooloose/nerdtree'
Plug 'NLKNguyen/papercolor-theme'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdcommenter'
Plug 'Raimondi/delimitMate'
Plug 'mattn/emmet-vim'
Plug 'dracula/vim'
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
call plug#end()
filetype plugin indent on
" plugin config
" nerdtree <tree>
map <leader>t :NERDTreeToggle<CR>
" ctrlp <find>
let g:ctrlp_map = "<leader>f"
" general config
set encoding=utf-8
set t_Co=256
syntax on
syntax enable
colorscheme PaperColor
" deoplete config
let g:deoplete#enable_at_startup = 1
"set background=dark
map <Leader>bg :let &background = ( &background == "dark"? "light" : "dark" )<CR>
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set hidden
set number
hi LineNr term=bold cterm=NONE ctermfg=grey ctermbg=NONE gui=NONE guibg=NONE
set tabstop=2
set shiftwidth=2
set expandtab
set autoindent
set cindent shiftwidth=2
set smartindent
set mouse=a
set cursorline
set cursorcolumn
hi CursorLine term=none cterm=none guibg=#303000 ctermbg=234
filetype indent on
filetype plugin on
filetype plugin indent on
set clipboard=unnamed
" shortcut config
imap jj <Esc>
nnoremap <Space> :
map <TAB> >
map <S-TAB> <
"vmap <silent> ;h :s?^\(\s*\)+ '\([^']\+\)',*\s*$?\1\2?g<CR>
"vmap <silent> ;q :s?^\(\s*\)\(.*\)\s*$? \1 + '\2'?<CR>
" shift + j/k to switch buffer
nmap <silent> <S-j> :bp<CR>
nmap <silent> <S-k> :bn<CR>
" delete buffer
nmap <silent> <leader>d :bn\|bd #<CR>
" U = redo
nmap <S-u> <C-r>
" leader-s to save
noremap <silent> <leader>s :update<CR>
vnoremap <silent> <leader>s <C-C>:update<CR>gv
" inoremap <silent> <C-S> <C-O>:update<CR> to enable insert mode after saving
inoremap <silent> <leader>s <Esc>:update<CR>
" wxapp.vim rebuild
nmap <leader>r <Plug>WxappReload
" omnicomplete
set completeopt=noinsert,longest,menuone
inoremap <expr> <Tab> pumvisible() ? "\<C-y>" : "\<Tab>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' : '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' : '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
" deoplete
let g:python3_host_prog="/usr/local/bin/python3.5"
let g:deoplete#enable_at_startup = 1
" airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_splits = 1
let g:airline#extensions#tabline#show_buffers = 1