dotfiles/.vimrc
2022-03-18 15:00:33 +01:00

55 lines
1.1 KiB
VimL

" vim: set ts=4 fenc=utf-8 ff=unix :
set cursorline
set scrolloff=3
set mouse=v
set number
" COLORS
syntax on
colorscheme elflord
highlight LineNr ctermfg=grey
set background=dark
"colorscheme solarized
"let g:solarized_termtrans = 1
" GVIM
if has("gui_running")
if has("gui_gtk2")
set guifont=CosmicSansNeueMono\ 12
elseif has("gui_macvim")
set guifont=CosmicSansNeueMono\ 12:h12
elseif has("gui_win32")
set guifont=CosmicSansNeueMono\ 12:h12:cANSI
endif
endif
" TEXT DISPLAY
set tabstop=4
" MODELINES
set modeline
" Append modeline before first line in buffer.
" Use substitute() instead of printf() to handle '%%s' modeline in LaTeX
" files.
function! AppendModeline()
let l:modeline = printf(" vim: set ts=%d ft=%s fenc=%s ff=%s :",
\ &tabstop, &filetype, &fileencoding, &fileformat)
let l:modeline = substitute(&commentstring, "%s", l:modeline, "")
call append (line("^"), l:modeline)
endfunction
nnoremap <silent> <Leader>ml :call AppendModeline()<CR>
" MAPPINGS
nnoremap <C-j> :tabnext<CR>
nnoremap <C-k> :tabprevious<CR>
imap jj <ESC>
map <ESC>[D <C-Left>
map <ESC>[C <C-Right>
" PLUGINS
let g:ycm_confirm_extra_conf = 0