This repository has been archived on 2023-01-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mail-config/vim/.vimrc

41 lines
1.3 KiB
VimL
Raw Normal View History

2017-04-13 13:08:50 +02:00
syn on
" Enable Ctrl+Backspace deleting the last word
imap <C-BS> <C-W>
set backspace=indent,eol,start " more powerful backspacing
2017-04-13 13:08:50 +02:00
set nocompatible " no vi compatible, seems to be good
set expandtab " covert TAB to spaces
set shiftwidth=2 " width of tabs
set softtabstop=2 " width of tabs
" Ctrl copy/cut paste behaviour
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <C-r><C-o>+
" Reformat shortcuts
nmap <F1> gqap " re-format the current paragraph correctly
"nmap <F2> gqqj " format a line which is too long, and go to the next line
"nmap <F3> kgqj " merge the previous line with the current one, with a correct formatting
2017-04-13 13:08:50 +02:00
map! <F1> <ESC>gqapi
"map! <F2> <ESC>gqqji
"map! <F3> <ESC>kgqji
2017-04-13 13:08:50 +02:00
" Arrow left moves up line when at position 0
set whichwrap+=<,>,[,]
" ASTROID
autocmd BufRead /home/max/.cache/astroid/* :source ~/.vim/advanced.vim
autocmd BufRead /home/max/.cache/astroid/* :source ~/.vim/astroid.vim
autocmd BufRead /home/max/.cache/astroid/* :source ~/.vim/mail.vim
2017-04-13 13:08:50 +02:00
" Thunderbird
autocmd BufRead /tmp/*.eml :source ~/.vim/advanced.vim
autocmd BufRead /tmp/*.eml :source ~/.vim/mail.vim
" textern (Firefox Addon)
autocmd BufRead /*/textern*/*.txt :source ~/.vim/advanced.vim
autocmd BufRead /*/textern*/*.txt :source ~/.vim/mail.vim