mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-12 16:06:39 -05:00
Add incsearch so all matches highlight together, configure plugin to
default search keys, and remap clear search to // (search key twice)
This commit is contained in:
parent
6106feb745
commit
70003e79d4
6 changed files with 23 additions and 3 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -100,3 +100,6 @@
|
||||||
[submodule "vim/bundle/ttagecho_vim"]
|
[submodule "vim/bundle/ttagecho_vim"]
|
||||||
path = vim/bundle/ttagecho_vim
|
path = vim/bundle/ttagecho_vim
|
||||||
url = https://github.com/tomtom/ttagecho_vim.git
|
url = https://github.com/tomtom/ttagecho_vim.git
|
||||||
|
[submodule "vim/bundle/incsearch.vim"]
|
||||||
|
path = vim/bundle/incsearch.vim
|
||||||
|
url = https://github.com/vim-scripts/incsearch.vim.git
|
||||||
|
|
1
vim/bundle.pager/incsearch.vim
Symbolic link
1
vim/bundle.pager/incsearch.vim
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../bundle/incsearch.vim
|
1
vim/bundle/incsearch.vim
Submodule
1
vim/bundle/incsearch.vim
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a4b7c9151ffef45c496632abbcbcb1e2cb2cb2cf
|
|
@ -217,7 +217,7 @@
|
||||||
" <Ctrl-Right> | (V) -> select one word right
|
" <Ctrl-Right> | (V) -> select one word right
|
||||||
" <Ctrl-Left> | (V) -> select one word left
|
" <Ctrl-Left> | (V) -> select one word left
|
||||||
"
|
"
|
||||||
" <Leader>/ | (N) -> remove search highlighting
|
" // | (N) -> remove search highlighting
|
||||||
"
|
"
|
||||||
" (remap dangerous functions that skip undo)
|
" (remap dangerous functions that skip undo)
|
||||||
" <Ctrl-u> | (I) -> undo-able equivalent
|
" <Ctrl-u> | (I) -> undo-able equivalent
|
||||||
|
@ -646,7 +646,7 @@
|
||||||
xnoremap <S-Left> ^
|
xnoremap <S-Left> ^
|
||||||
|
|
||||||
"clear search results
|
"clear search results
|
||||||
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
|
nnoremap <silent><expr> // '<Esc>:noh<CR>'
|
||||||
"}
|
"}
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,16 @@
|
||||||
autocmd FileType gundo setlocal nocursorcolumn
|
autocmd FileType gundo setlocal nocursorcolumn
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
"INCSEARCH: {{{
|
||||||
|
"use incsearch in place of the default search
|
||||||
|
map / <Plug>(incsearch-forward)
|
||||||
|
map ? <Plug>(incsearch-backward)
|
||||||
|
map g/ <Plug>(incsearch-stay)
|
||||||
|
|
||||||
|
"n and N behavioru is consistant
|
||||||
|
let g:incsearch#consistent_n_direction = 1
|
||||||
|
"}}}
|
||||||
|
|
||||||
"JSON: {{{
|
"JSON: {{{
|
||||||
let g:vim_json_warnings=0
|
let g:vim_json_warnings=0
|
||||||
let g:vim_json_syntax_conceal=0
|
let g:vim_json_syntax_conceal=0
|
||||||
|
|
|
@ -70,12 +70,17 @@ vnoremap <C-c> y
|
||||||
nnoremap T vg_y
|
nnoremap T vg_y
|
||||||
vnoremap T g_y
|
vnoremap T g_y
|
||||||
|
|
||||||
|
" Search
|
||||||
|
map / <Plug>(incsearch-forward)
|
||||||
|
map ? <Plug>(incsearch-backward)
|
||||||
|
map g/ <Plug>(incsearch-stay)
|
||||||
|
nnoremap <silent><expr> // '<Esc>:noh<CR>'
|
||||||
|
|
||||||
" Selection
|
" Selection
|
||||||
nnoremap <C-a> gg0vG$
|
nnoremap <C-a> gg0vG$
|
||||||
xnoremap <C-a> <Esc>gg0vG$
|
xnoremap <C-a> <Esc>gg0vG$
|
||||||
nnoremap <Leader>a gg0vG$
|
nnoremap <Leader>a gg0vG$
|
||||||
xnoremap <Leader>a <Esc>gg0vG$
|
xnoremap <Leader>a <Esc>gg0vG$
|
||||||
nnoremap <silent><expr> <Leader>/ ':noh<CR>'
|
|
||||||
|
|
||||||
" Toggles
|
" Toggles
|
||||||
nnoremap <silent><expr> <F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
nnoremap <silent><expr> <F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
||||||
|
|
Loading…
Reference in a new issue