Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set encoding=utf8
- set fileencoding=utf8
- " let c_no_curly_error=1 " enhanced highlight issue
- call plug#begin('~/.vim/plugged')
- Plug 'kaicataldo/material.vim'
- Plug 'itchyny/lightline.vim'
- Plug 'preservim/nerdtree'
- " Plug 'Xuyuanp/nerdtree-git-plugin'
- Plug 'gabrielelana/vim-markdown'
- Plug 'joker1007/vim-markdown-quote-syntax'
- " Plug 'octol/vim-cpp-enhanced-highlight'
- call plug#end()
- if has("gui_running")
- au GUIEnter * simalt ~x " maximize window
- set guioptions-=m " menu
- set guioptions-=T " toolbar
- set guioptions-=L " left scrollbar
- set guioptions-=r " right scrollbar
- " set guioptions-=b " buttom scrollbar
- " set showtabline=0 " tabline
- set guifont=Microsoft\ Yahei\ Mono:h14 " for Windows
- " set guifont=Ubuntu\ Mono\ derivative\ Powerline:h14
- au GUIEnter * set vb t_vb=
- endif
- " color desert
- color material
- let g:lightline = { 'colorscheme': 'wombat' }
- set laststatus=2
- syntax on
- set nu rnu ai bs=2 et sw=4 sts=4 hls
- set noeb vb t_vb=
- set cursorline noshowmode lazyredraw termguicolors
- au! InsertEnter,InsertLeave
- au InsertEnter,InsertLeave * set rnu!
- inoremap {<CR> {<CR>}<C-o>O
- nnoremap ya :%y+<CR>
- nnoremap <silent> <C-TAB> :tabNext<CR>
- nnoremap <silent> <C-S-TAB> :tabprevious<CR>
- nnoremap <C-N> :tabnew<CR>:e
- nnoremap <silent> <A-j> :m.1<CR>==
- nnoremap <silent> <A-k> :m.-2<CR>==
- vnoremap <silent> <A-j> :m '>+1<CR>gv=gv
- vnoremap <silent> <A-k> :m '<-2<CR>gv=gv
- vnoremap > >gv
- vnoremap < <gv
- nnoremap <silent> <F2> :cd %:h<CR>:NERDTreeToggle<CR>
- au BufEnter,BufLeave *.cpp call CppFastBuild()
- function CppFastBuild()
- nnoremap <F9> :w<CR>:!g++ % -o %:r -std=c++17 -Dlocal<CR>:!%:r<CR><CR>
- nnoremap <F10> :!%:r<CR><CR>
- endfunction
- au BufEnter,BufLeave *.py call PythonFastBuild()
- function PythonFastBuild()
- nnoremap <F10> :w<CR>:!%<CR><CR>
- nnoremap <F8> :w<CR>:!cmd<CR><CR>
- endfunction
Add Comment
Please, Sign In to add comment