1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00
Files
vimconfig/vim/.vim/vimrc

87 lines
1.9 KiB
VimL

scriptencoding utf-8
filetype plugin indent on
filetype plugin on
syntax on
set ruler
set title
set number
set relativenumber
set hlsearch
set incsearch
set ignorecase smartcase
set omnifunc=syntaxcomplete#Complete
set background=light
set tabstop=4 softtabstop=4 shiftwidth=4
set backspace=eol,indent,start
set diffopt+=iwhite
colorscheme molokai
set colorcolumn=72
" I have never intended to use the builtin help
map <F1> <Esc>
imap <F1> <Esc>
map <F5> :update<CR>:make<CR>
imap <F5> <Esc>:update<CR>:make<CR>
map <F7> :call SetExecutable()<CR>
imap <F7> <Esc>:call SetExecutable<CR>
" Paste using Ctrl+V in insert mode.
inoremap <C-v> <C-o>"+P<C-o>=']
"language specific syntastic configurtion
"syntastic configuration
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_wq = 0
autocmd Filetype python setlocal expandtab
autocmd Filetype markdown setlocal textwidth=72 expandtab
autocmd Filetype haskell setlocal expandtab
" Remove trailing whitespace, always.
fun! StripTrailingWhitespace()
" Skip files where the type is trailing space sensitive.
if &ft =~ 'diff'
return
endif
%s/\s\+$//e
endfun
autocmd BufWritePre * call StripTrailingWhitespace()
" Keep backup files etc out of the way
set undofile
set undolevels=1000
set undoreload=10000
set undodir=~/.cache/vim/undo " vim will not create this directory.
set directory=~/.cache/vim/swap " vim will not create this directory.
set backupdir=~/.cache/vim/backup " vim will not create this directory.
set backup
set viminfo+=n~/.cache/vim/viminfo
" Death to the "Thanks for flying vim" message
set titleold=""
" Fix an issue with the indentLine plugin.
let g:indentLine_concealcursor='nc'
" Make sure we use the expected clipboard
set clipboard=unnamedplus
" Configure line breaking
set linebreak
set breakindent
set breakindentopt=min:0,shift:4,sbr
set showbreak=