Esiste un comando in Vim che modifica il caso del testo selezionato?
Esiste un comando in Vim che modifica il caso del testo selezionato?
Risposte:
Visual selezionare il testo , quindi Uper le lettere maiuscole o uminuscole. Per scambiare tutti i contenitori in una selezione visiva, premere ~(tilde).
Senza usare una selezione visiva, gU<motion>
renderà i caratteri in motion
maiuscolo o li useremo gu<motion>
per minuscoli.
Per ulteriori informazioni, consultare la Sezione 3 nel file della guida change.txt di Vim .
g~<motion>
anche. Potrei aggiungere questo, tendo a usarlo ~
esclusivamente.
gUiw
per trasformare una parola in maiuscolo. Grazie!
Vedi i seguenti metodi:
~ : Changes the case of current character
guu : Change current line from upper to lower.
gUU : Change current LINE from lower to upper.
guw : Change to end of current WORD from upper to lower.
guaw : Change all of current WORD to lower.
gUw : Change to end of current WORD from lower to upper.
gUaw : Change all of current WORD to upper.
g~~ : Invert case to entire line
g~w : Invert case to current WORD
guG : Change to lowercase until the end of document.
guw
cambia il caso dalla posizione corrente fino alla fine della parola. guaw
o guiw
cambia il caso dell'intera parola.