LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Extremely stupid question about tab key (specifically in Vim) (https://www.linuxquestions.org/questions/linux-newbie-8/extremely-stupid-question-about-tab-key-specifically-in-vim-155100/)

Imek 03-08-2004 03:30 PM

Extremely stupid question about tab key (specifically in Vim)
 
Hi,

I've been messing around with Python, looked at some sources, and noticed that the indentations all seem to be with 4 spaces each, but when I press tab I get 8 spaces.. Why is this? Is there any way to set tab to 4 instead of 8, or otherwise find a way to get 4 instead of 8 without the tedium of pressing space 4 times?

Thanks,

- I

ricstirato 03-08-2004 05:11 PM

The default tab width on almost any computer system/application is 8.

In vim, you can set it in /etc/vim/vimrc (global) or ~/.vimrc by editing/adding the line

set tabstop=4

(or whatever tab width you like)


All times are GMT -5. The time now is 06:42 AM.