aboutsummaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
Diffstat (limited to '.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