2018-11-20 15:13:51 +01:00
|
|
|
" Python settings
|
|
|
|
|
|
|
|
|
|
|
|
" Shortcuts
|
2020-01-04 08:42:48 +01:00
|
|
|
imap <leader>ifm if<Space>__name__<Space>==<Space>'__main__':<CR>
|
2018-11-20 15:13:51 +01:00
|
|
|
|
|
|
|
" Compiling
|
2020-01-20 01:04:10 +01:00
|
|
|
map <C-c><C-c> <Esc>:!clear; python %<CR><CR>
|
2018-11-20 15:13:51 +01:00
|
|
|
|
|
|
|
" Use the below highlight group when displaying bad whitespace is desired.
|
|
|
|
highlight BadWhitespace ctermbg=red guibg=red
|
|
|
|
|
|
|
|
" Display tabs at the beginning of a line in Python mode as bad.
|
|
|
|
au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
|
|
|
|
|
|
|
|
" Make trailing whitespace be flagged as bad.
|
|
|
|
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
|