Normally I want
nano to replace tabs with spaces, so I use
set tabstospaces in my
.nanorc file. Occasionally I'd like to use
nano to make a quick edit to makefiles where I need real tab characters.
Is there any way to dynamically toggle
tabstospaces? Most of the other options have keys to toggle them, but I can't find something for this. I've also tried using
^I (which by default is bound to the
tab function) to insert a tab, but that honors the
My current workaround is to take
set tabstospaces out of my
.nanorc file and to add shell aliases instead:
alias nanotabs="$(which nano)" alias nano="$(which nano) --tabstospaces"