Add movement map, make map, clean VimLeave
This commit is contained in:
parent
2dfe727875
commit
ad59db816b
1 changed files with 9 additions and 2 deletions
|
@ -20,6 +20,9 @@ imap <F2> <ESC>:w<CR>i
|
||||||
" global copy/paste
|
" global copy/paste
|
||||||
nmap <leader>y "*yy
|
nmap <leader>y "*yy
|
||||||
nmap <leader>p "*p
|
nmap <leader>p "*p
|
||||||
|
|
||||||
|
" compile
|
||||||
|
nmap <leader>c :w<CR>:!make<CR>
|
||||||
" }}}
|
" }}}
|
||||||
" VIM-PLUG {{{
|
" VIM-PLUG {{{
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
@ -129,6 +132,10 @@ nnoremap <space> za
|
||||||
" move vertically by visual line (don't jump wrapped lines)
|
" move vertically by visual line (don't jump wrapped lines)
|
||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
|
map <C-h> <C-w>h
|
||||||
|
map <C-j> <C-w>j
|
||||||
|
map <C-k> <C-w>k
|
||||||
|
map <C-l> <C-w>l
|
||||||
" }}}
|
" }}}
|
||||||
" AUTOGROUPS {{{
|
" AUTOGROUPS {{{
|
||||||
augroup configgroup
|
augroup configgroup
|
||||||
|
@ -146,8 +153,8 @@ augroup configgroup
|
||||||
autocmd BufWritePre * :StripWhitespace
|
autocmd BufWritePre * :StripWhitespace
|
||||||
" Run Flake8 on write in python files
|
" Run Flake8 on write in python files
|
||||||
autocmd BufWritePost *.py call flake8#Flake8()
|
autocmd BufWritePost *.py call flake8#Flake8()
|
||||||
" Run make on write in LaTeX files if Makefile exists in directory
|
" Run make clean when leaving a LaTeX file if Makefile exists in directory
|
||||||
autocmd BufWritePost *.tex ![ -f ./Makefile ] && make || echo "No Makefile"
|
autocmd VimLeave *.tex ![ -f ./Makefile ] && make clean || echo "No Makefile"
|
||||||
|
|
||||||
" Toggle relative number and absolute number according to focus and insert
|
" Toggle relative number and absolute number according to focus and insert
|
||||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||||
|
|
Loading…
Add table
Reference in a new issue