由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 大侠,请问如何在VI和XEMACS中对齐程序?
相关主题
xemacs中怎么样设置自动回车对齐?xemacs 里如何设置让它显示行号?
How to see line number in EmacsRe: xemacs ?
emacs问题求教----有关C程序格式请教How to adjust man output?
how to save preferences in VI?发现只要几行字就可以让Sun的F90编译器当掉
how to change the speed of cursors?How to save XEmacs options?
一个奇怪的现象!how to install speedbar on xemacs?
How to debug C program in Unix能在xemacs中把Del键设成删除光标后的字符的功能键吗
a low_hand_question about emacs.some wt
相关话题的讨论汇总
话题: vim话题: indent话题: feature话题: vi话题: xemacs
进入Unix版参与讨论
1 (共1页)
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 的大作中提到】
: 我按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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 我按TAB键,但有时上下对不齐,不知是何原因?
: 挺麻烦的!
: 各位是如何处理的?
: 谢谢!

w*******g
发帖数: 99
7
My xemacs works ok and I really like it, :-)

【在 j****s 的大作中提到】
: 我按TAB键,但有时上下对不齐,不知是何原因?
: 挺麻烦的!
: 各位是如何处理的?
: 谢谢!

i***e
发帖数: 3219
8
Use emacs, so that you can use it under a text terminal as well. :)

【在 w*******g 的大作中提到】
: 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 的大作中提到】
: 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,
相关主题
一个奇怪的现象!xemacs 里如何设置让它显示行号?
How to debug C program in UnixRe: xemacs ?
a low_hand_question about emacs.请教How to adjust man output?
进入Unix版参与讨论
j****s
发帖数: 34
11
Thanks so many! :-)

【在 g*****t 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
: 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 的大作中提到】
:
: 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 的大作中提到】
: 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 "}".

1 (共1页)
进入Unix版参与讨论
相关主题
some wthow to change the speed of cursors?
SUN F90 compiler一个奇怪的现象!
EMACS 求教How to debug C program in Unix
XEmacs Shell 问题a low_hand_question about emacs.
xemacs中怎么样设置自动回车对齐?xemacs 里如何设置让它显示行号?
How to see line number in EmacsRe: xemacs ?
emacs问题求教----有关C程序格式请教How to adjust man output?
how to save preferences in VI?发现只要几行字就可以让Sun的F90编译器当掉
相关话题的讨论汇总
话题: vim话题: indent话题: feature话题: vi话题: xemacs