Change vim search & replace mapping

This commit is contained in:
Michael Campagnaro 2020-04-20 12:41:58 -04:00
parent 93f683b5d3
commit aed80c1bab
4 changed files with 38 additions and 4 deletions

View File

@ -19,7 +19,7 @@ if has('termguicolors')
let s:green = "88b888" let s:green = "88b888"
let s:red = "ef2929" let s:red = "ef2929"
let s:text = "e9e9e9" let s:text = "f1f1f1"
let s:foreground = s:text let s:foreground = s:text
let s:background = "08363c" let s:background = "08363c"

View File

@ -233,3 +233,31 @@ souvlaki
relatability relatability
zen zen
todo todo
hotloader
MSAA
FBO
multisampled
blit
multisample
UVs
msaa
uv
FXAA
async
mouseover
checkbox
supersampling
u16
premultiplying
mip
mips
mem
u32
proc
hardcode
hotloading
win32
ui
weapon
fov
exe

Binary file not shown.

12
vimrc
View File

@ -961,7 +961,13 @@ nnoremap <expr> p (&buftype is# "quickfix" ? "<CR>\|:copen<CR>" : "p")
function! GlobalReplaceIt(confirm_replacement) function! GlobalReplaceIt(confirm_replacement)
if exists(':Ggrep') if exists(':Ggrep')
call inputsave() call inputsave()
let l:term = input('Enter search term: ')
if a:confirm_replacement
let l:term = input('Enter search term (w/ confirmation): ')
else
let l:term = input('Enter search term (no confirmation): ')
endif
call inputrestore() call inputrestore()
if empty(l:term) if empty(l:term)
return return
@ -986,8 +992,8 @@ function! GlobalReplaceIt(confirm_replacement)
echo "Unable to search since you're not in a git repo" echo "Unable to search since you're not in a git repo"
endif endif
endfunction endfunction
map <leader>gg :call GlobalReplaceIt(0)<cr> map <leader>r :call GlobalReplaceIt(0)<cr>
map <leader>gr :call GlobalReplaceIt(1)<cr> map <leader>rr :call GlobalReplaceIt(1)<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""