On 2015-07-30 20:30, Erik Christiansen wrote:
function! Append_Date()
normal G
:r !date '+\%d.\%m:'
normal A
endfunction
You're on the right track. As an aside, you can just specify the
line before the :r command and the : is superfluous. To simplify
matters further, vim
On 30.07.15 20:30, Erik Christiansen wrote:
Desired Enhancement:
...
Changing to named parameters fails through lack of an eval/expand on the
a:Format, but then also switching to strange appending syntax¹ ($put)
found on the list:
au BufWinEnter ~/Personal/rainfall/*/* call
Is there a repository of spell files for different languages?
Googling i found a link to
ftp://ftp.vim.org/pub/vim/runtime/spell/ but it seems to be dead.
Even though it turned out to be a piece of cake to build .spl
files once you have gotten hold of an appropriate
OpenOffice/LibreOffice
On 30.07.15 07:52, Tim Chase wrote:
So combining those above with your enhancement request, I came up
with the following function which seems to do what you want:
function! Append_Date(fmt)
$put=strftime(a:fmt)
startinsert!
endfunction
Many thanks Tim. That does it exactly, is
On 2015-07-31 00:14, Erik Christiansen wrote:
On 30.07.15 07:52, Tim Chase wrote:
So combining those above with your enhancement request, I came up
with the following function which seems to do what you want:
function! Append_Date(fmt)
$put=strftime(a:fmt)
startinsert!
On 30.07.15 09:41, Tim Chase wrote:
So the first ex command is the :put command (:help :put) with a
Doh! Yes, now it has a place in the jigsaw.
It is very early morning here, too late in the night for coffee.
I'll read up on it tomorrow. Have to fit in a bit of sleep somewhere.
Thanks.
Erik
On Jul 28, 2015 18:31, David Besen dbe...@gmail.com wrote:
Second draft, seems to work a little better:
save undo if we qa!
function! MyWundoQuit()
let undoseq = undotree().seq_cur
earlier 1f
let undof = escape(undofile(expand('%')),'% ')
exec wundo . undof
silent!
What I have so far is:
Autoinsert date at end of file, _after_ reading modelines:
au BufWinEnter ~/Data/rainfall/*/* call Append_Date()
function! Append_Date()
normal G
:r !date '+\%d.\%m:'
normal A
endfunction
Problem:
The normal A moves the cursor to the end of the