We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c5826f4 + 509f3f8 commit 32b1310Copy full SHA for 32b1310
.vimrc
@@ -111,7 +111,7 @@ nmap tt :%s/\t/ /g<CR>
111
"""""新文件标题
112
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
113
"新建.c,.h,.sh,.java文件,自动插入文件头
114
-autocmd BufNewFile *.cpp,*.[ch],*.sh,*.java,*.py exec ":call SetTitle()"
+autocmd BufNewFile *.cpp,*.[ch],*.sh,*.rb,*.java,*.py exec ":call SetTitle()"
115
""定义函数SetTitle,自动插入文件头
116
func SetTitle()
117
"如果文件类型为.sh文件
@@ -121,7 +121,13 @@ func SetTitle()
121
elseif &filetype == 'python'
122
call setline(1,"#!/usr/bin/env python")
123
call append(line("."),"# coding=utf-8")
124
- call append(line(".")+1, "")
+ call append(line(".")+1, "")
125
+
126
+ elseif &filetype == 'ruby'
127
+ call setline(1,"#!/usr/bin/env ruby")
128
+ call append(line("."),"# encoding: utf-8")
129
130
131
" elseif &filetype == 'mkd'
132
" call setline(1,"<head><meta charset=\"UTF-8\"></head>")
133
else
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments