1
0
Fork 0
mirror of synced 2024-12-25 00:03:20 -05:00

Add settings for background.

This commit is contained in:
Kurtis Moxley 2022-05-23 15:34:56 +08:00
parent 16f84cb33c
commit 15599f5565

View file

@ -1,5 +1,5 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Important: " Important:
" This requries that you install https://github.com/amix/vimrc ! " This requries that you install https://github.com/amix/vimrc !
" "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -28,6 +28,7 @@ set guioptions-=l
set guioptions-=L set guioptions-=L
" Colorscheme " Colorscheme
autocmd vimenter * hi Normal guibg=NONE ctermbg=NONE " transparent bg
"set background=dark "set background=dark
let ayucolor="light" let ayucolor="light"
colorscheme ayu colorscheme ayu
@ -41,7 +42,7 @@ autocmd! bufwritepost ~/.vim_runtime/my_configs.vim source ~/.vim_runtime/my_con
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Turn persistent undo on " => Turn persistent undo on
" means that you can undo even when you close a buffer/VIM " means that you can undo even when you close a buffer/VIM
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
try try
@ -61,13 +62,13 @@ cno $j e ./
cno $c e <C-\>eCurrentFileDir("e")<cr> cno $c e <C-\>eCurrentFileDir("e")<cr>
" $q is super useful when browsing on the command line " $q is super useful when browsing on the command line
" it deletes everything until the last slash " it deletes everything until the last slash
cno $q <C-\>eDeleteTillSlash()<cr> cno $q <C-\>eDeleteTillSlash()<cr>
" Bash like keys for the command line " Bash like keys for the command line
cnoremap <C-A> <Home> cnoremap <C-A> <Home>
cnoremap <C-E> <End> cnoremap <C-E> <End>
cnoremap <C-K> <C-U> cnoremap <C-K> <C-U>
cnoremap <C-P> <Up> cnoremap <C-P> <Up>
cnoremap <C-N> <Down> cnoremap <C-N> <Down>
@ -115,14 +116,14 @@ autocmd FileType css set omnifunc=csscomplete#CompleteCSS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use the the_silver_searcher if possible (much faster than Ack) " Use the the_silver_searcher if possible (much faster than Ack)
if executable('ag') if executable('ag')
let g:ackprg = 'ag --vimgrep --smart-case' let g:ackprg = 'ag --vimgrep --smart-case'
endif endif
" When you press gv you Ack after the selected text " When you press gv you Ack after the selected text
vnoremap <silent> gv :call VisualSelection('gv', '')<CR> vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
" Open Ack and put the cursor in the right position " Open Ack and put the cursor in the right position
map <leader>g :Ack map <leader>g :Ack
" When you press <leader>r you can search and replace the selected text " When you press <leader>r you can search and replace the selected text
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR> vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
@ -165,7 +166,7 @@ func! DeleteTillSlash()
else else
let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "") let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "")
endif endif
endif endif
return g:cmd_edited return g:cmd_edited
endfunc endfunc
@ -206,26 +207,26 @@ imap <F5> <Esc>:call CompileRun()<CR>
vmap <F5> <Esc>:call CompileRun()<CR> vmap <F5> <Esc>:call CompileRun()<CR>
func! CompileRun() func! CompileRun()
exec "w" exec "w"
if &filetype == 'c' if &filetype == 'c'
exec "!gcc % -o %<" exec "!gcc % -o %<"
exec "!time ./%<" exec "!time ./%<"
elseif &filetype == 'cpp' elseif &filetype == 'cpp'
exec "!g++ % -o %<" exec "!g++ % -o %<"
exec "!time ./%<" exec "!time ./%<"
elseif &filetype == 'java' elseif &filetype == 'java'
exec "!javac %" exec "!javac %"
exec "!time java %" exec "!time java %"
elseif &filetype == 'sh' elseif &filetype == 'sh'
exec "!time bash %" exec "!time bash %"
elseif &filetype == 'python' elseif &filetype == 'python'
exec "!time python3 %" exec "!time python3 %"
elseif &filetype == 'html' elseif &filetype == 'html'
exec "!google-chrome % &" exec "!google-chrome % &"
elseif &filetype == 'go' elseif &filetype == 'go'
exec "!go build %<" exec "!go build %<"
exec "!time go run %" exec "!time go run %"
elseif &filetype == 'matlab' elseif &filetype == 'matlab'
exec "!time octave %" exec "!time octave %"
endif endif
endfunc endfunc