j****s 发帖数: 34 | 1 我按TAB键,但有时上下对不齐,不知是何原因?
挺麻烦的!
各位是如何处理的?
谢谢! |
t*******a 发帖数: 22 | 2 in vi, you can just enable autoindent and everything will go nicely
in emacs, things could be messed up. then you need to select the text you wanna
indent and M-x indent-region
【在 j****s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我按TAB键,但有时上下对不齐,不知是何原因? : 挺麻烦的! : 各位是如何处理的? : 谢谢!
|
j****s 发帖数: 34 | 3 Hi, thanks.
But in vi, how can Ienable that one?
I mean when I program, I always put some time on the format which I should not
spend time on it.
I would prefer my program is easy to read, with a good format.
I did it easily in BC3.1 in dos, but seems sth wrong in unix.
【在 t*******a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : in vi, you can just enable autoindent and everything will go nicely : in emacs, things could be messed up. then you need to select the text you wanna : indent and M-x indent-region
|
bz 发帖数: 1770 | 4 user expand or indent when you think you feel it is the right time to do it.
【在 j****s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Hi, thanks. : But in vi, how can Ienable that one? : I mean when I program, I always put some time on the format which I should not : spend time on it. : I would prefer my program is easy to read, with a good format. : I did it easily in BC3.1 in dos, but seems sth wrong in unix.
|
q***e 发帖数: 90 | 5 Better use vim, I am not sure whether autoindent or smartindent
is standard vi feature or vim extended feature. Anyway, vim provide
more nice feature for programming.
【在 bz 的大作中提到】![](/moin_static193/solenoid/img/up.png) : user expand or indent when you think you feel it is the right time to do it.
|
i*******r 发帖数: 377 | 6 If you using linux, Just man indent
then using indent to take over it :)
【在 j****s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我按TAB键,但有时上下对不齐,不知是何原因? : 挺麻烦的! : 各位是如何处理的? : 谢谢!
|
w*******g 发帖数: 99 | 7 My xemacs works ok and I really like it, :-)
【在 j****s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我按TAB键,但有时上下对不齐,不知是何原因? : 挺麻烦的! : 各位是如何处理的? : 谢谢!
|
i***e 发帖数: 3219 | 8 Use emacs, so that you can use it under a text terminal as well. :)
【在 w*******g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : My xemacs works ok and I really like it, :-)
|
j****s 发帖数: 34 | 9 Thanks all!!!
And I remember vim can display color for C program. But I do not know how.
How can I know the feature of vim?
Thanks
【在 q***e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Better use vim, I am not sure whether autoindent or smartindent : is standard vi feature or vim extended feature. Anyway, vim provide : more nice feature for programming.
|
g*****t 发帖数: 42 | 10 In vim you just hit the following key in the command mode.
your file format will autoindented and saved,
gg=G:w
and following key to display color,
and following key to know the feature of vim, |
|
|
j****s 发帖数: 34 | 11 Thanks so many! :-)
【在 g*****t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : In vim you just hit the following key in the command mode. : your file format will autoindented and saved, : gg=G:w : and following key to display color, : and following key to know the feature of vim,
|
w*******g 发帖数: 99 | 12 That is really cool...
【在 g*****t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : In vim you just hit the following key in the command mode. : your file format will autoindented and saved, : gg=G:w : and following key to display color, : and following key to know the feature of vim,
|
D****g 发帖数: 2860 | 13 vim可不可以用空格instead of tab?我在windows下总是用空格,tab很烦人
没个editor解释都不一样.而且,我缩进都是四格.
【在 q***e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Better use vim, I am not sure whether autoindent or smartindent : is standard vi feature or vim extended feature. Anyway, vim provide : more nice feature for programming.
|
j*****g 发帖数: 980 | 14 set expandtab
set smarttab
set ts=4
【在 D****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : vim可不可以用空格instead of tab?我在windows下总是用空格,tab很烦人 : 没个editor解释都不一样.而且,我缩进都是四格.
|
j****s 发帖数: 34 | 15 why "gg=G:w" cannot work?
IT said no such command.
I press : first, then type that.
I do not know why.
Thanks
【在 g*****t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : In vim you just hit the following key in the command mode. : your file format will autoindented and saved, : gg=G:w : and following key to display color, : and following key to know the feature of vim,
|
p******f 发帖数: 162 | 16
no : needed.
【在 j****s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : why "gg=G:w" cannot work? : IT said no such command. : I press : first, then type that. : I do not know why. : Thanks
|
w******e 发帖数: 208 | 17 The way I like Xemacs is that it can do great job in automatic indenting.
Place your cursor on the start "{", and press ctrl+alt+q all together. It will
indent the whole region to your matching "}".
【在 p******f 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : no : needed.
|
w*******g 发帖数: 99 | 18 I like that too. Another feature I like is that it can turn all the keywords
in my F90 code into Capital...
【在 w******e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : The way I like Xemacs is that it can do great job in automatic indenting. : Place your cursor on the start "{", and press ctrl+alt+q all together. It will : indent the whole region to your matching "}".
|