diff --git a/vimrc b/vimrc index 7e352f9..4ef16c5 100644 --- a/vimrc +++ b/vimrc @@ -100,8 +100,6 @@ noremap :setl number! noremap :setl relativenumber! noremap :setl autowriteall!:setl autowriteall? noremap :setl list! -nnoremap :retab! -nnoremap :setl expandtab!:set expandtab? nnoremap ge nnoremap gE com! Setwd :cd %:p:h @@ -113,6 +111,11 @@ nnoremap dcx 0d$ nnoremap Bi i nnoremap Ea a nnoremap : :let @* = @: + +" Tabs vs. Spaces +nnoremap :retab! +nnoremap :setl expandtab!:set expandtab? +" todo: custom function to retab only indentation " Empty Lines nnoremap :call Enter(0) @@ -120,12 +123,12 @@ nnoremap :call Enter(1) function! s:Enter(shift) if !a:shift if col(".")-1 - exe "normal o\0d$" + exe "normal o\0\"_d$" else - exe "normal O\0d$j0" + exe "normal O\0\"_d$j" end else - exe "normal O\0d$j" + exe "normal O\0\"_d$" endif endfunction