moved some color-related stuff to gvimrc file

This commit is contained in:
Talia 2017-10-18 18:58:06 +02:00
parent 01b1a199a3
commit d6647b86e0
2 changed files with 31 additions and 31 deletions

30
gvimrc Normal file
View file

@ -0,0 +1,30 @@
augroup filecolors
autocmd!
" au BufLeave * :colorscheme slate
" au BufEnter *.rb :colorscheme desert
" au BufEnter *.txt :colorscheme morning
" au BufEnter *.vim,.vimrc,_vimrc :colorscheme morning
augroup end
let s:colors=['slate', 'desert', 'blue', 'ron', 'elflord', 'murphy', 'torte']
function! Randomcolor()
let random = localtime() % len(s:colors)
execute "colorscheme ".s:colors[random]
endfunction
call Randomcolor()
" Color Stuff
nnoremap <C-F1> :colorscheme slate<CR>
nnoremap <C-F2> :colorscheme desert<CR>
nnoremap <C-F3> :colorscheme blue<CR>
nnoremap <C-F4> :colorscheme ron<CR>
nnoremap <C-F5> :colorscheme peachpuff<CR>
nnoremap <C-F6> :colorscheme morning<CR>
nnoremap <C-F7> :colorscheme delek<CR>
nnoremap <C-F8> :colorscheme shine<CR>
nnoremap <C-F9> :colorscheme elflord<CR>
nnoremap <C-F10> :colorscheme murphy<CR>
nnoremap <C-F11> :colorscheme torte<CR>
nnoremap <C-F12> :call Randomcolor()<CR>

32
vimrc
View file

@ -116,22 +116,6 @@ nnoremap dcx 0d$
nnoremap <ENTER> o<esc>
nnoremap <S-ENTER> O<esc>
" Color Stuff
nnoremap <C-F1> :colorscheme slate<CR>
nnoremap <C-F2> :colorscheme desert<CR>
nnoremap <C-F3> :colorscheme blue<CR>
nnoremap <C-F4> :colorscheme ron<CR>
nnoremap <C-F5> :colorscheme peachpuff<CR>
nnoremap <C-F6> :colorscheme morning<CR>
nnoremap <C-F7> :colorscheme delek<CR>
nnoremap <C-F8> :colorscheme shine<CR>
nnoremap <C-F9> :colorscheme elflord<CR>
nnoremap <C-F10> :colorscheme murphy<CR>
nnoremap <C-F11> :colorscheme torte<CR>
nnoremap <C-F12> :call Randomcolor()<CR>
" Markdown Stuff
vnoremap * <C-c>`>a*<C-c>`<i*<C-c>
vnoremap _ <C-c>`>a__<C-c>`<i__<C-c>
@ -178,26 +162,12 @@ function! Autosave()
if &autowriteall==1
silent w
echo "Lost focus, buffer saved."
redraw
endif
endfunction
au FocusLost * call Autosave()
au WinLeave * call Autosave()
augroup filecolors
autocmd!
" au BufLeave * :colorscheme slate
" au BufEnter *.rb :colorscheme desert
" au BufEnter *.txt :colorscheme morning
" au BufEnter *.vim,.vimrc,_vimrc :colorscheme morning
augroup end
let s:colors=['slate', 'desert', 'blue', 'ron', 'elflord', 'murphy', 'torte']
function! Randomcolor()
let random = localtime() % len(s:colors)
execute "colorscheme ".s:colors[random]
endfunction
call Randomcolor()
vnoremap <leader>g :<C-u>call <SID>GrepOperator(visualmode())<CR>
nnoremap <leader>g :set operatorfunc=<SID>GrepOperator<CR>g@
function! s:GrepOperator(type)