Comment définir la commande
while 1|sleep 10|call NextColor(1)|endwhile
dans le fichier de configuration ~/.vimrc
?while 1|sleep 10|call NextColor(1)|endwhile
dans le fichier de configuration ~/.vimrc
?.vimrc
donc c'est impossible.Code : Tout sélectionner
*search()-sub-match*
With the 'p' flag the returned value is one more than the
first sub-match in \(\). One if none of them matched but the
whole pattern did match.
To get the column number too use |searchpos()|.
The cursor will be positioned at the match, unless the 'n'
flag is used.
Example (goes over all files in the argument list): >
:let n = 1
:while n <= argc() " loop over all files in arglist
: exe "argument " . n
: " start at the last char in the file and wrap for the
: " first search to find match at start of file
: normal G$
: let flags = "w"
: while search("foo", flags) > 0
: s/foo/bar/g
: let flags = "W"
: endwhile
: update " write the file if modified
: let n = n + 1
:endwhile
Code : Tout sélectionner
[N]gs *gs* *:sl* *:sleep*
:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
sleep for [N] milliseconds. The count for "gs" always
uses seconds. The default is one second. >
:sleep "sleep for one second
:5sleep "sleep for five seconds
:sleep 100m "sleep for a hundred milliseconds
10gs "sleep for ten seconds
< Can be interrupted with CTRL-C (CTRL-Break on
MS-Windows). "gs" stands for "goto sleep".
While sleeping the cursor is positioned in the text,
if at a visible position.
Also process the received netbeans messages. {only
available when compiled with the |+netbeans_intg|
feature}
Cette commande marche, mais il faut l'ajouter au plugin :
command Chgcol while 1|sleep 10|call NextColor(1)|endwhile