分页: 1 / 1

[问题]对.bash_profile做了些错误操作后……

发表于 : 2007-07-06 2:24
killerpro
E325: ATTENTION
Found a swap file by the name ".bash_profile.swp"
owned by: sandwich dated: Fri Jul 6 01:57:13 2007
file name: ~sandwich/.bash_profile
modified: YES
user name: sandwich host name: sandwich-desktop
process ID: 8626
While opening file ".bash_profile"
dated: Fri Jul 6 01:29:57 2007

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r .bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".bash_profile.swp"
to avoid this message.
".bash_profile" 3 lines, 102 characters
Press ENTER or type command to continue


然后出现这样的东西……
怎么怎么样删除.bash_profile.swp??

还有,如果我真的想对.bash_profile进行修改的话……
怎么怎么修改??
例如我想在里面加入:
export GTK_IM_MODULE=xim
export XMODIFIERS=”@im=fcitx”

应该怎么弄??

发表于 : 2007-07-06 8:11
xhy
用vim编辑后 不要使用鼠标关闭终端
要先退出vim再关闭终端

任何运行在终端程序 最好都不要直接关闭终端

发表于 : 2007-07-06 9:20
killerpro
那么我应该怎么弄呢现在……?

怎么删除那个.swp?

还有……

用完vim,应该怎么保存……

和怎么不保存退出的??

发表于 : 2007-07-06 9:34
igi
killerpro 写了:那么我应该怎么弄呢现在……?

怎么删除那个.swp?

还有……

用完vim,应该怎么保存……

和怎么不保存退出的??

先退出编辑模式,按esc可以退出,然后输入 wq (代表写入并退出)

不保存就是!q

也可以在命令模式下直接输入 ZZ (保存) ZQ(不保存) 注意是大写的

Re: [问题]对.bash_profile做了些错误操作后……

发表于 : 2007-07-06 9:35
igi
killerpro 写了:E325: ATTENTION
Found a swap file by the name ".bash_profile.swp"
owned by: sandwich dated: Fri Jul 6 01:57:13 2007
file name: ~sandwich/.bash_profile
modified: YES
user name: sandwich host name: sandwich-desktop
process ID: 8626
While opening file ".bash_profile"
dated: Fri Jul 6 01:29:57 2007

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r .bash_profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".bash_profile.swp"
to avoid this message.
".bash_profile" 3 lines, 102 characters
Press ENTER or type command to continue


然后出现这样的东西……
怎么怎么样删除.bash_profile.swp??

还有,如果我真的想对.bash_profile进行修改的话……
怎么怎么修改??
例如我想在里面加入:
export GTK_IM_MODULE=xim
export XMODIFIERS=”@im=fcitx”

应该怎么弄??

这个你重新编辑并保存一下就没问题了