A blog dedicated to text editing and general exploration of computing knowledge
Is there a built-in way (other than to search/replace groups of spaces) to convert n spaces into tabs? Note: not interested in the ensuing flame war about using tabs vs. spaces.
Last I looked, "retab" was what turned tabs into spaces.:set noexpandtab:retab!will turn spaces into tabs. (It's not perfect -- a single space won't be replaced with a tab even if it would match up with the tabstop -- but it's really useful.)Me, I use 4-space "tabs". :-)
Post a Comment
2 comments:
Is there a built-in way (other than to search/replace groups of spaces) to convert n spaces into tabs?
Note: not interested in the ensuing flame war about using tabs vs. spaces.
Last I looked, "retab" was what turned tabs into spaces.
:set noexpandtab
:retab!
will turn spaces into tabs. (It's not perfect -- a single space won't be replaced with a tab even if it would match up with the tabstop -- but it's really useful.)
Me, I use 4-space "tabs". :-)
Post a Comment