Trovo che le macro siano un modo fantastico per fare cose insolite se sei interessato a farlo non più di una volta in una luna blu. Supponiamo che tu abbia la seguente tabella:
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% S |
% o | So you can't just write your
% m |
% e | text and transform it into
% |
% M | the shape that you want
% s |
% g | Macros help here
% |
% V
E diciamo che si desidera sostituire Some Msgcon Other Message. Prima di tutto, estendiamo la tabella per il carattere extra (riga prima dell'ultima yy5p:
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% S |
% o | So you can't just write your
% m |
% e | text and transform it into
% |
% M | the shape that you want
% s |
% g | Macros help here
% |
% |
% |
% |
% |
% |
% V
La macro che mi verrà in mente si occuperà di convertire il testo da orizzontale a verticale mentre sostituisce il vecchio testo. Inizia digitando il testo nella prima posizione (il cursore si trova alla fine di Other Message):
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% SOther Message |
% o | So you can't just write your
% m |
% e | text and transform it into
% |
% M | the shape that you want
% s |
% g | Macros help here
% |
% |
% |
% |
% |
% |
% V
Registra la seguente macro:
qq: avvia la registrazione della macro denominata q
^: vai all'inizio della riga
3l: passa alla colonna in cui verrà inserito il testo
x: elimina il vecchio carattere
l: sposta a destra, lasciando un carattere dal messaggio al posto del vecchio personaggio:
v: vai in modalità visiva
f|: salta a |
2h: torna indietro di due caratteri
d: taglia la selezione
j: abbassati
P: incolla prima del cursore
q: termina la registrazione della macro
A questo punto hai:
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% O |
% other Message | So you can't just write your
% m |
% e | text and transform it into
% |
% M | the shape that you want
% s |
% g | Macros help here
% |
% |
% |
% |
% |
% |
% V
Ripeti il numero di macro abbastanza volte (ad es. Il numero di caratteri, ma non è necessario conoscerlo in anticipo. Basta sottovalutare e continuare una volta che vedi quanto è vicina la stima). Quindi andiamo con 10@q. Ottieni:
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% O |
% t | So you can't just write your
% h |
% e | text and transform it into
% r |
% | the shape that you want
% M |
% e | Macros help here
% s |
% s |
% a |
% ge |
% |
% |
% V
Ok, un altro ( @q):
%
% Not Important
% O ------------------------->
% | Stuff in side the table
% O |
% t | So you can't just write your
% h |
% e | text and transform it into
% r |
% | the shape that you want
% M |
% e | Macros help here
% s |
% s |
% a |
% g |
% e |
% |
% V
Il cursore è ora sull'ultimo e. La macro non funziona bene con l'ultima lettera (puoi provare con @qe poi u(annullare) per risultati insoddisfacenti). Basta regolarlo da soli ( Xper il backspace).
:s/./% \0\r/per aggiungere il%e newline ... Non un'ottima soluzione, però ...