|
@@ -363,6 +363,16 @@ if !has("nvim")
|
|
|
endw
|
|
endw
|
|
|
endif
|
|
endif
|
|
|
|
|
|
|
|
|
|
+" Smart indent when entering insert mode with i on empty lines
|
|
|
|
|
+function! IndentWithI()
|
|
|
|
|
+ if len(getline('.')) == 0
|
|
|
|
|
+ return "\"_cc"
|
|
|
|
|
+ else
|
|
|
|
|
+ return "i"
|
|
|
|
|
+ endif
|
|
|
|
|
+endfunction
|
|
|
|
|
+nnoremap <expr> i IndentWithI()
|
|
|
|
|
+
|
|
|
" For auto-aligning '|' delimited tables
|
|
" For auto-aligning '|' delimited tables
|
|
|
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
|
|
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
|
|
|
function! s:align()
|
|
function! s:align()
|