aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-11-09 12:50:31 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-11-09 12:50:31 +0100
commitde592e55966c940e953746e4d836de78bd39d65c (patch)
tree470eda22726863a71f1f27300527d6a84654f85d
parent1f182a2886de267b0d29bcc81dc08b64d231c8e1 (diff)
downloaddotfiles-de592e55966c940e953746e4d836de78bd39d65c.tar.gz
vim
-rw-r--r--.vim/vimrc10
1 files changed, 9 insertions, 1 deletions
diff --git a/.vim/vimrc b/.vim/vimrc
index 6058881..63b3b30 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -88,6 +88,14 @@ nmap <silent> <F6> :TlistToggle<CR>
nmap <silent> gc :tabclose<CR>
nmap <silent> gn :tabnew<CR>:e .<CR>
+" Smart brackets
+inoremap " ""<left>
+inoremap ' ''<left>
+inoremap ( ()<left>
+inoremap [ []<left>
+inoremap { {}<left>
+inoremap {<CR> {<CR>}<ESC>O
+inoremap {;<CR> {<CR>};<ESC>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