Skip to content

Commit

Permalink
.vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
guodongxiaren committed Sep 15, 2014
1 parent 7278383 commit 802327d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func SetTitle()
call append(line(".")+4, " ************************************************************************/")
call append(line(".")+5, "")
endif
if &filetype == 'cpp'
if expand("%:e") == 'cpp'
call append(line(".")+6, "#include<iostream>")
call append(line(".")+7, "using namespace std;")
call append(line(".")+8, "")
Expand All @@ -148,6 +148,11 @@ func SetTitle()
call append(line(".")+6, "#include<stdio.h>")
call append(line(".")+7, "")
endif
if expand("%:e")== 'h'
call append(line(".")+6, "#ifndef _".toupper(expand("%:r"))."_H")
call append(line(".")+7, "#define _".toupper(expand("%:r"))."_H")
call append(line(".")+8, "#endif")
endif
if &filetype == 'java'
call append(line(".")+6,"public class ".expand("%:r"))
call append(line(".")+7,"")
Expand Down

0 comments on commit 802327d

Please sign in to comment.