ma (to set a mark) in a script?»,
sent 18:38:22 08 March 2011, Tuesday
by Marc Weber:
> let mark = 'a'
> exec 'normal m'.mark
``normal!'', not ``normal''
> or exec "normal /...<cr>"
``execute "/..."'' works as well. And `<CR>' in your example should be `\n'.
Original message:
> Excerpts from Rostyslaw Lewyckyj's message of Tue Mar 08 05:21:03 +0000 2011:
> > I'd like to write me a script which for example does the following:
> > - set a mark at the current line ma
>
> let mark = 'a'
> exec 'normal m'.mark
>
> or the like
>
> > - find a line with a pattern x /^$/
> :
> :h search(
>
> or exec "normal /...<cr>"
>
> etc.
>
> Marc Weber
No comments:
Post a Comment