Vim setting
" vim settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set vim syntax detection on
syntax=on
" set auto display linenumber
set nu[mber]
" set ignorecase when search
set ignorecase
" set smartcase
set smartcase
" set increment search
set incsearch
" set hightlight search
set hlsearch
" set wildmenu, command auto complete
set wildmenu
" set cursor
set cursorline
hightlight Cursor guifg=black guibg=white
" set help language
set helplang=cn
" set auto indent
set autoindent
" set expand tab
set expandtab
" set tab stop
set tabstop=4
" set shift width
set shiftwidth=4
" set soft tab stop
set softtabstop=4
" set show match
set showmatch
set vim mapping
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set map leader,设置映射的leader键,加了leader,执行时都需要先按leader键
let mapleader=","
" set (map) (nmap, imap, vmap) (nnoremap, inoremap, vnoremap)
" map映射对normal模式,insert模式,visual模式都适用,且时递归recursive映射
" nmap: normal模式下的递归映射, imap: insert模式下的递归映射, vmap:visual模式下的递归映射
" nnoremap: normal模式下的非递归(no recursive)映射,其它同理
" 映射时加上 <silent> 则不会在底行模式下显示执行命令
" set nmap H 让光标移动到行首
nmap H ^
" set nmap J 7j 让光标向下移动7行
nmap J 7j
" set nmap K 7k 让光标向上移动7行
nmap K 7k
" set nmap L $ 让光标移动到行尾
nmap L $
" set nmap <C-h> <C-w>h 多窗口下让光标移到上面的窗口,其它同理
nmap <C-h> <C-w>h
nmap <C-h> <C-w>j
nmap <C-h> <C-w>k
nmap <C-h> <C-w>l
" set shotcut
nnoremap <leader>w :w<cr>
nnoremap <leader>q :q<cr>
nnoremap <leader>s :wq<cr>
" 设置快捷取消高亮保存
nnoremap <leader>n :noh<cr>
set vim function call
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" template1
map <F5> :call CompileRun()
func[tion]! CompileRun()
" statement
endfunc[tion]
" template2
func[tion]! s:generate_vimspector_conf()
" statement
" e .vimspector.json
endfunc[tion]
command! -nargs=0 Gvimspector: call s:generate_vimspector_conf()
" vim-plug settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype plugin on
call plug#begin('~/.vim/plugged')
" Plug 'vim-airline' settings, if effect, edit in ~/.bashrc and add export TERM=xterm-256color
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline
let g:airline
let g:airline
let g:airline
let laststatus=2
let g:airline_powershell_fonts=1
let g:airline_theme="light"
call plug
" vundle settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""