Skip to content

Commit

Permalink
change ctrlsf
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyangze committed Dec 16, 2022
1 parent 42a1258 commit 86b8d4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions layers/common/search-ctrlpsf.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Plug 'dyng/ctrlsf.vim'
let g:ctrlsf_extra_backend_args = {
\ 'rg': '-U'
\ 'rg': '-U -F'
\ }
let g:ctrlsf_regex_pattern = 1
let g:ctrlsf_regex_pattern = 0
4 changes: 2 additions & 2 deletions layers/common/tool-functions.vim
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ function! GetCtrlsfSearchText(s)
let l:reg_list = ['\\', '\\', '$', '[', ']', '(', ')', '*', '{', '}', '?', '|', '.', "'", "\"", '+']

for item in l:reg_list
let l:s = escape(l:s, item)
"let l:s = escape(l:s, item)
endfor

let l:s = substitute(substitute(l:s, '\n', '\\n', 'g'), '\t', '\\t', 'g')
"let l:s = substitute(substitute(l:s, '\n', '\\n', 'g'), '\t', '\\t', 'g')
return l:s
endfunction

Expand Down
4 changes: 2 additions & 2 deletions layers/user/quickmap.vim
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ nmap ,q :q!<CR>
nmap ,r :Rooter<CR>
nmap ,s :call FernFindCurrentFile()<CR>
nmap ,k :TagbarToggle<CR>
nmap ,v :<C-U>execute("CtrlSF \"" . GetCtrlsfSearchText("") . "\"")<CR>
nmap ,w :w!<CR>
nmap ,y :YankHistoryRgPaste<CR>
vmap ,f :<C-u>call FzfFilesFunction()<CR>
vmap ,g :<C-U>execute("Rg " . GetRgSearchTextV2(""))<CR>
vmap ,v :<C-U>execute("CtrlSF \"" . GetCtrlsfSearchText("") . "\"")<CR>
vmap ,v :<C-U>execute("CtrlSF \"" . escape(GetCtrlsfSearchText(""), '"') . "\"")<CR>
nmap ,v :<C-U>execute("CtrlSF \"" . escape(GetCtrlsfSearchText(""), '"') . "\"")<CR>
nmap =1 :q 1<CR>
nmap =2 :q 2<CR>
Expand Down

0 comments on commit 86b8d4f

Please sign in to comment.