dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit 99388ff29c9324db6063a1ed5365e1348e6fb75f
parent cbdef664559303197fa772547b29e648bb4fa08c
Author: Chris Noxz <chris@noxz.tech>
Date:   Sat, 28 Mar 2020 22:20:12 +0100

[vim] remove unnecessary scripts

Diffstat:
Mvim/.config/vim/vimrc | 44--------------------------------------------
1 file changed, 0 insertions(+), 44 deletions(-)

diff --git a/vim/.config/vim/vimrc b/vim/.config/vim/vimrc @@ -143,44 +143,6 @@ set shiftround " round indent of multiple of 'shiftwidth' " smart tab {{{ " based on smarttabs.vim and changed to work with completion -function! SmartIndent(to) - let line = getline('.') - let tabs = matchstr(line, '^\t*') - if (line =~ '^\t* \+') - let nspaces = strlen(matchstr(line, '^\t* \+')) - strlen(tabs) - else - let line = matchstr(line, '[^\t]*$') - let nspaces = -1 - for char in a:to - let nspaces = nspaces == -1 - \ ? strridx(line, char) + 1 - \ : nspaces - endfor - if (nspaces == -1) | return "\<CR>" | endif - endif - let spaces = "" - for space in range(nspaces) - let spaces = spaces . " " - endfor - return "\<CR>\<C-W>".tabs.spaces -endfunction - -function! SmartIndentOn(chars, to) - let lastchar = strpart(getline('.'), col('.') - 2) - for char in a:chars - if (lastchar == char) | return SmartIndent(a:to) | endif - endfor - return "\<CR>" -endfunction - -function! SmartIndentUnless(chars, to) - let lastchar = strpart(getline('.'), col('.') - 2) - for char in a:chars - if (lastchar == char) | return "\<CR>" | endif - endfor - return SmartIndent(a:to) -endfunction - function! SmartTab() let before = strpart(getline('.'), 0, col('.') - 1) if (before =~ '^\t*$') | return "\t" | endif @@ -195,12 +157,6 @@ endfunction function! SmartDelete() return "\<BS>" endfunction - -" language specifics -autocmd BufEnter *.c,*.cpp inoremap <CR> - \ <C-R>=SmartIndentUnless([')', '{'], ['('])<CR> -autocmd BufEnter *.py inoremap <CR> - \ <C-R>=SmartIndentOn([','], ['(', '[', '{'])<CR> " }}} " autocomplete {{{