Hello
I'm trying to get used to advanced text editors. I've started with vim, and now switched to emacs. However, emacs indentation drives me crazy. Things like
Code:
int main(void)
{
...
if (n == 1)
{
...
and so on
I just want it to be similar like VIM's:
Code:
99 ········set expandtab "no real tabs, spaces instead
102 ········set softtabstop=4 " when hitting tab or backspace, how many spaces
103 "should a tab be (see expandtab)
104 ········set tabstop=8···"real tabs should be 8, and they will show with
106 ········set autoindent
107 ········set smartindent
108
109 ········set listchars=tab:··
110 ········set list
so the code will look like
Code:
7 int main(void)
8 {
9 int a, b, num = 0, errors, i;
10
11 srand(time(NULL));
12
13 while (true)
14 {
15 errors = 0;
16
17 for (i = 1; i <= 10; i++)
18 {
19 a = rand() % 10;
20 b = rand() % 10;
and it can be handy to emphasis real tabs too. Also when I hit enter, I want emacs to place the cursor in the same indentation position (106 ········set autoindent).
Thank you for your attention.