Re: Persistent undo and force quit

2015-07-28 Thread David Besen
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! exec u . undoseq endfunction autocmd BufWinLeave * call

match() to get the offsets of all matches of a pattern in a string

2015-07-28 Thread BPJ
I have a string of rows of dashes alternating with spaces, where the number of dashes/spaces is variable - --- --- I want to get a List of the offsets of all the space sequences, kind of a match() with /g (that's the best I can do to describe it...) In the case above

Re: I cannot realise a :map why ??

2015-07-28 Thread aubertin.sylvain
Le mardi 21 juillet 2015 10:02:15 UTC+2, aubertin.sylvain a écrit : For instance I should like to make F9 stand for papa Following VIM Manual (by Moolenaar) I type : :map F9 ipapaEsc (5 characters for Esc and 4 characters for F5 ) But it doesn't work. Instead of « papa «  , it returns F9

Re: match() to get the offsets of all matches of a pattern in a string

2015-07-28 Thread BPJ
Den 2015-07-28 18:02, BPJ skrev: I have a string of rows of dashes alternating with spaces, where the number of dashes/spaces is variable - --- --- I want to get a List of the offsets of all the space sequences, kind of a match() with /g (that's the best I can do to

Re: Persistent undo and force quit

2015-07-28 Thread David Besen
Here's a first draft of getting it to work: save undo if we qa! function! MyWundoQuit() silent! later 9 earlier 1f let undof = escape(undofile(expand('%')),'% ') exec wundo . undof endfunction autocmd BufWinLeave * call MyWundoQuit() I don't see a way to undo back to when