Edit Page
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 51: | Line 51: | ||
" files. |
" files. |
||
function! AppendModeline() |
function! AppendModeline() |
||
β | let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d |
+ | let l:modeline = printf(" vim: set ts=%d sw=%d tw=%d :", |
β | \ &tabstop, &shiftwidth, &textwidth |
+ | \ &tabstop, &shiftwidth, &textwidth) |
let l:modeline = substitute(&commentstring, "%s", l:modeline, "") |
let l:modeline = substitute(&commentstring, "%s", l:modeline, "") |
||
call append(line("$"), l:modeline) |
call append(line("$"), l:modeline) |
||
Line 61: | Line 61: | ||
In a C file, you would get a modeline like this: |
In a C file, you would get a modeline like this: |
||
<pre> |
<pre> |
||
β | /* vim: set ts=8 sw=4 tw=0 |
+ | /* vim: set ts=8 sw=4 tw=0: */ |
</pre> |
</pre> |
||