Merge branch 'master' of gitea.tforgione.fr:tforgione/dotfiles

This commit is contained in:
Thomas Forgione 2018-09-28 14:05:08 +02:00
commit b2eaace5e7
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
2 changed files with 17 additions and 4 deletions

View File

@ -57,10 +57,18 @@ set list
set listchars=tab:,trail,extends:>,precedes:<,nbsp
" Remove trailing spaces
autocmd BufWritePre * :%s/\s\+$//e
" Compile on F12
nnoremap <silent><F12> :wa \| !make-client.py<CR>
inoremap <silent><F12> <C-O>:wa \|!make-client.py<CR>
vnoremap <silent><F12> :wa \|!make-client.py<CR>
if executable('mars')
nnoremap <silent><F12> :wa \| !mars<CR>
inoremap <silent><F12> <C-O>:wa \|!mars<CR>
vnoremap <silent><F12> :wa \|!mars<CR>
elseif executable('make')
nnoremap <silent><F12> :wa \| !make<CR>
inoremap <silent><F12> <C-O>:wa \|!make<CR>
vnoremap <silent><F12> :wa \|!make<CR>
endif
" Escape on F1
map <F1> <Esc>
imap <F1> <Esc>

View File

@ -1,5 +1,10 @@
# My editor
export EDITOR="vim"
command -v nvim > /dev/null 2>&1
if [ $? -eq 0 ]; then
export EDITOR="nvim"
else
export EDITOR="vim"
fi
# Parallel conpilation with make
export MAKEFLAGS="+j`nproc`"