Mercurial > dotfiles
diff .chezmoitemplates/config.vim @ 627:a2a5862a3bd3
convert more vimscript to lua
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 28 Jul 2022 22:25:29 +0200 |
parents | f795168ece65 |
children | c5ed13440614 |
line wrap: on
line diff
--- a/.chezmoitemplates/config.vim Tue Jul 26 22:33:25 2022 +0200 +++ b/.chezmoitemplates/config.vim Thu Jul 28 22:25:29 2022 +0200 @@ -25,38 +25,21 @@ " Mappings -" Highlight VCS conflict markers -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' -" Search for selected text, forwards or backwards. -vnoremap <silent> * :<C-U> - \let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> - \gvy/<C-R><C-R>=substitute( - \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> - \gV:call setreg('"', old_reg, old_regtype)<CR> -vnoremap <silent> # :<C-U> - \let old_reg=getreg('"')<Bar>let old_regtype=getregtype('"')<CR> - \gvy?<C-R><C-R>=substitute( - \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR> - \gV:call setreg('"', old_reg, old_regtype)<CR> - -xnoremap <silent> p p:if v:register == '"'<Bar>let @@=@0<Bar>endif<CR> - - -if has('nvim') - tnoremap <C-h> <C-\><C-n><C-w>h - tnoremap <C-j> <C-\><C-n><C-w>j - tnoremap <C-k> <C-\><C-n><C-w>k - tnoremap <C-l> <C-\><C-n><C-w>l - augroup enter_term - au! - autocmd TermOpen * startinsert! - autocmd BufEnter * if &buftype ==# 'terminal' | :startinsert! | endif - autocmd BufLeave * if &buftype ==# 'terminal' | :stopinsert! | endif - augroup END - let $GIT_EDITOR = 'nvr -cc split --remote-wait' -endif +" if has('nvim') +" tnoremap <C-h> <C-\><C-n><C-w>h +" tnoremap <C-j> <C-\><C-n><C-w>j +" tnoremap <C-k> <C-\><C-n><C-w>k +" tnoremap <C-l> <C-\><C-n><C-w>l +" augroup enter_term +" au! +" autocmd TermOpen * startinsert! +" autocmd BufEnter * if &buftype ==# 'terminal' | :startinsert! | endif +" autocmd BufLeave * if &buftype ==# 'terminal' | :stopinsert! | endif +" augroup END +" let $GIT_EDITOR = 'nvr -cc split --remote-wait' +" endif " @@ -129,7 +112,7 @@ return "\<CR>" endif endfunction -cnoremap <expr> <CR> CCR() +" cnoremap <expr> <CR> CCR() " " Filetype specific settings