2020-05-25 15:51:47 +00:00
|
|
|
" Basic vim settings
|
|
|
|
set title
|
|
|
|
set number
|
2020-03-30 06:56:05 +00:00
|
|
|
set laststatus=2
|
2020-05-25 15:30:38 +00:00
|
|
|
set encoding=utf-8
|
|
|
|
set autoindent
|
|
|
|
|
2020-03-30 06:56:05 +00:00
|
|
|
filetype indent plugin on
|
2020-05-25 15:30:38 +00:00
|
|
|
|
|
|
|
" Global tab settings
|
2020-03-30 06:56:05 +00:00
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
2020-05-25 15:30:38 +00:00
|
|
|
set softtabstop=4
|
2020-03-30 06:56:05 +00:00
|
|
|
set expandtab
|
2020-05-25 15:30:38 +00:00
|
|
|
|
|
|
|
" Set to show invisibles (tabs & trailing spaces) & their highlight color
|
|
|
|
set list listchars=tab:»\ ,trail:·
|
2020-03-30 06:56:05 +00:00
|
|
|
|
2020-05-29 05:36:04 +00:00
|
|
|
function! Highlight()
|
|
|
|
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
|
|
|
|
match OverLength /\%81v.\+/
|
|
|
|
endfunction
|
|
|
|
nnoremap _h :call Highlight()<CR>
|
|
|
|
|
2020-05-24 13:07:25 +00:00
|
|
|
|
2020-03-30 06:56:05 +00:00
|
|
|
""""""""""""""""""""
|
|
|
|
" GnuPG Extensions "
|
|
|
|
""""""""""""""""""""
|
|
|
|
" sudo zypper install vim-plugin-gnupg
|
|
|
|
|
|
|
|
let g:GPGDefaultRecipients=[
|
|
|
|
\"Jonas Forsberg <jonas@forsberg.co>",
|
|
|
|
\"Jonas Forsberg <jonas.forsberg@suse.com>"
|
|
|
|
\]
|
|
|
|
|
|
|
|
" Tell the GnuPG plugin to armor new files.
|
|
|
|
let g:GPGPreferArmor=1
|
|
|
|
|
|
|
|
" Tell the GnuPG plugin to sign new files.
|
|
|
|
let g:GPGPreferSign=1
|
|
|
|
|
|
|
|
augroup GnuPGExtra
|
|
|
|
" Set extra file options.
|
|
|
|
autocmd BufReadCmd,FileReadCmd *.\(gpg\|asc\|pgp\) call SetGPGOptions()
|
|
|
|
" Automatically close unmodified files after inactivity.
|
|
|
|
autocmd CursorHold *.\(gpg\|asc\|pgp\) quit
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
function SetGPGOptions()
|
|
|
|
" Set updatetime to 1 minute.
|
|
|
|
set updatetime=60000
|
|
|
|
" Fold at markers.
|
|
|
|
set foldmethod=marker
|
|
|
|
" Automatically close all folds.
|
|
|
|
set foldclose=all
|
|
|
|
" Only open folds with insert commands.
|
|
|
|
set foldopen=insert
|
|
|
|
endfunction
|
2020-05-22 09:12:55 +00:00
|
|
|
|
2020-05-25 15:30:38 +00:00
|
|
|
if has("autocmd")
|
2020-05-25 15:45:24 +00:00
|
|
|
" To spell check all git commit messages
|
|
|
|
au BufNewFile,BufRead COMMIT_EDITMSG set spelllang=en_us spell nonumber nolist wrap linebreak
|
|
|
|
|
2020-05-25 15:30:38 +00:00
|
|
|
" Set filetype tab settings
|
|
|
|
autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et
|
|
|
|
endif
|