From de592e55966c940e953746e4d836de78bd39d65c Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 9 Nov 2020 12:50:31 +0100 Subject: vim --- .vim/vimrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.vim/vimrc b/.vim/vimrc index 6058881..63b3b30 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -88,6 +88,14 @@ nmap :TlistToggle nmap gc :tabclose nmap gn :tabnew:e . +" Smart brackets +inoremap " "" +inoremap ' '' +inoremap ( () +inoremap [ [] +inoremap { {} +inoremap { {}O +inoremap {; {};O " =========== " COMMANDS @@ -113,7 +121,7 @@ command -bar Fileheader call Insert_Header(expand("%")) function Insert_Header(name) let l:name=systemlist("git config --global --get user.name")[0] let l:mail=systemlist("git config --global --get user.email")[0] - call append("0", ["/*", " * ".a:name, " * (c) ".strftime("%Y")." ".l:name." <".l:mail.">", " * License: ", "*/"]) + call append("0", ["/*", " * ".a:name, " * (c) ".strftime("%Y")." ".l:name." <".l:mail.">", " * License: ", " */"]) startinsert endfunction -- cgit v1.2.3