mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
2 commits
6fb8f22daf
...
75573bb9ba
Author | SHA1 | Date | |
---|---|---|---|
|
75573bb9ba | ||
|
0597f8fde9 |
2 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@ let s:vim_plug_home = s:vim_config_dir . '/plugged'
|
||||||
|
|
||||||
let s:just_installed_vim_plug = 0
|
let s:just_installed_vim_plug = 0
|
||||||
if !filereadable(s:vim_plug_script)
|
if !filereadable(s:vim_plug_script)
|
||||||
execute '!curl -fL https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim --create-dirs -o' shellescape(s:vim_plug_script)
|
execute '!curl -fL https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim --create-dirs -o' shellescape(s:vim_plug_script, 1)
|
||||||
autocmd VimEnter * PlugInstall --sync
|
autocmd VimEnter * PlugInstall --sync
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
|
||||||
let s:rg_ignore = split(&wildignore, ',') + [
|
let s:rg_ignore = split(&wildignore, ',') + [
|
||||||
\ 'node_modules', 'target', 'build', 'dist', '.stack-work'
|
\ 'node_modules', 'target', 'build', 'dist', '.stack-work'
|
||||||
\ ]
|
\ ]
|
||||||
let s:rg_cmd .= " --glob '!{'" . shellescape(join(s:rg_ignore, ',')) . "'}'"
|
let s:rg_cmd .= " --glob '!{'" . shellescape(join(s:rg_ignore, ','), 1) . "'}'"
|
||||||
|
|
||||||
let &grepprg = s:rg_cmd . ' --vimgrep'
|
let &grepprg = s:rg_cmd . ' --vimgrep'
|
||||||
let $FZF_DEFAULT_COMMAND = s:rg_cmd . ' --files'
|
let $FZF_DEFAULT_COMMAND = s:rg_cmd . ' --files'
|
||||||
command! -bang -nargs=* Rg call fzf#vim#grep(s:rg_cmd . ' --column --line-number --no-heading --fixed-strings --smart-case --color always ' . shellescape(<q-args>), 1, <bang>0)
|
command! -bang -nargs=* Rg call fzf#vim#grep(s:rg_cmd . ' --column --line-number --no-heading --fixed-strings --smart-case --color always ' . shellescape(<q-args>, 1), 1, <bang>0)
|
||||||
command! -bang -nargs=* Find Rg<bang> <args>
|
command! -bang -nargs=* Find Rg<bang> <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
|
||||||
function! s:grep_mapping_star_normal()
|
function! s:grep_mapping_star_normal()
|
||||||
let word = expand("<cword>")
|
let word = expand("<cword>")
|
||||||
if !empty(word)
|
if !empty(word)
|
||||||
call feedkeys(":\<C-u>grep " . shellescape('\b' . word . '\b'), 'n')
|
call feedkeys(":\<C-u>grep " . shellescape('\b' . word . '\b', 1), 'n')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
function! s:grep_mapping_star_visual()
|
function! s:grep_mapping_star_visual()
|
||||||
let tmp = @"
|
let tmp = @"
|
||||||
normal! y
|
normal! y
|
||||||
call feedkeys(":\<C-u>grep " . shellescape(@"), 'n')
|
call feedkeys(":\<C-u>grep " . shellescape(@", 1), 'n')
|
||||||
let @" = tmp
|
let @" = tmp
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>* <Cmd>call <SID>grep_mapping_star_normal()<CR>
|
nnoremap <leader>* <Cmd>call <SID>grep_mapping_star_normal()<CR>
|
||||||
|
@ -137,7 +137,7 @@ nnoremap <silent><expr> <CR> empty(&buftype) ? ":write<bar>wall\<CR>" : "\<CR>"
|
||||||
echoerr "Please install <https://github.com/mwh/dragon> for the DragOut command to work."
|
echoerr "Please install <https://github.com/mwh/dragon> for the DragOut command to work."
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
execute '!dragon-drag-and-drop '.shellescape(a:path)
|
execute '!dragon-drag-and-drop' shellescape(a:path, 1)
|
||||||
endfunction
|
endfunction
|
||||||
command -nargs=* -complete=file DragOut call s:DragOut(empty(<q-args>) ? expand('%') : <q-args>)
|
command -nargs=* -complete=file DragOut call s:DragOut(empty(<q-args>) ? expand('%') : <q-args>)
|
||||||
" }}}
|
" }}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue