{"id":804,"date":"2013-09-01T00:00:00","date_gmt":"2013-09-01T00:00:00","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2013\/09\/01\/vim-how-do-i-make-the-width-of-a-single-tab-only-4-spaces-wide\/"},"modified":"2023-01-15T22:48:02","modified_gmt":"2023-01-15T22:48:02","slug":"vim-how-do-i-make-the-width-of-a-single-tab-only-4-spaces-wide","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/UNIX\/General\/vim-how-do-i-make-the-width-of-a-single-tab-only-4-spaces-wide.html","title":{"rendered":"VIM: Set the Width of a Single TAB to 4 Spaces Wide"},"content":{"rendered":"
In this extremely short article we will provide you with the steps required to make the width of a single TAB only 4 spaces wide. Within your ~\/.vimrc<\/span> file add the following lines.<\/p>\n There are 2 other VIM commands that can be especially useful, when dealing with TAB’s. They are:<\/p>\n :set list<\/strong> – shows unprintable characters. Note : Both of the above commands are run directly within the VIM terminal.<\/p>\n","protected":false},"excerpt":{"rendered":" In this extremely short article we will provide you with the steps required to make the width of a single TAB only 4 spaces wide. This especially useful when using Visual Mode within VIM , in that you can indent large portions of text. Steps Within your ~\/.vimrc file add the following lines. set shiftwidth=4\u00a0\u00a0 … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"yoast_head":"\n
\nThis especially useful when using Visual Mode<\/a> within VIM , in that you can indent large portions of text.<\/p>\nSteps<\/strong><\/h2>\n
set shiftwidth=4\u00a0\u00a0 \" change the number of space characters inserted for indentation\r\nset expandtab\u00a0\u00a0\u00a0\u00a0\u00a0 \" insert spaces whenever a tab key is pressed\r\nset softtabstop=4\u00a0 \" makes the spaces feel like real tabs<\/pre>\n
Additional<\/strong><\/h2>\n
\n:retab<\/strong> – converts all TABs to spaces.<\/p>\n