用secureRT登陆linux虚拟机,进入uboot目录下发现无法修改文件
本帖最后由 yidehui 于 2013-5-3 14:42 编辑book@book-desktop:/work/system/u-boot-1.1.6/common$ vi Makefile
回车enter
E325: ATTENTION
Found a swap file by the name ".Makefile.swp"
owned by: book dated: Fri May3 13:28:50 2013
file name: /work/system/u-boot-1.1.6/common/Makefile
modified: YES
user name: book host name: book-desktop
process ID: 2177 (still running)
While opening file "Makefile"
dated: Fri May3 13:48:55 2013
NEWER than swap file!
(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 Makefile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".Makefile.swp"
to avoid this message.
Swap file ".Makefile.swp" already exists!
pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
选择E(.Makefile.swp文件我后来删除了,再次打开makefile文件,就没有这个提示。但是问题还没有完!)
以下是Makefile一部分,但是用键盘无法添加一些.o文件,也就是无法编辑,我试了6次,印象里只有1次能编辑,这是怎么回事!?
有时候按下键盘的字母,发现光标跳来跳去,有时无缘无故就把一行代码给删了!
还有一次,想在这行virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o 后面加上cmd_hello.o,用键盘敲上去后,整行代码被删了!
COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o \
env_nvram.o env_nowhere.o \
exports.o \
flash.o fpga.o ft_build.o \
hush.o kgdb.o lcd.o lists.o lynxkdi.o \
memsize.o miiphybb.o miiphyutil.o \
s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \
usb.o usb_kbd.o usb_storage.o \
virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o
上次编辑时意外退出了。 rm.Makefile.swp
也就是说,删除.Makefile.swp 这个文件即可
兄弟,看看提示。vim -r Makefile 也可以。办法有很多。。。。
人家都告诉了:
(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 Makefile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".Makefile.swp"
to avoid this message.
Swap file ".Makefile.swp" already exists!
pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
本帖最后由 yidehui 于 2013-5-3 14:41 编辑
postek 发表于 2013-5-3 14:27 static/image/common/back.gif
兄弟,看看提示。vim -r Makefile 也可以。办法有很多。。。。
人家都告诉了:
(1) Another program may be ...
我已经删了swp文件,现在没有这个警告了
本帖最后由 yidehui 于 2013-5-3 14:41 编辑
postek 发表于 2013-5-3 14:27 static/image/common/back.gif
兄弟,看看提示。vim -r Makefile 也可以。办法有很多。。。。
人家都告诉了:
(1) Another program may be ...
有时候按下键盘的字母,发现光标跳来跳去,有时无缘无故就把一行代码给删了!
还有一次,想在这行virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o 后面加上cmd_hello.o,用键盘敲上去后,整行代码被删了!
我发现无法正常编辑时,光标无法移到最左边,上面正常可编辑时就可以移到o的右边处!!!!!!!!!!!!!!这是怎么回事!
{:lol:}
没有无缘无故的事儿。 “有时无缘无故就把一行代码给删了!”
是连按两下 d吧?
lz不熟悉vim吧。可以用nano之类的编辑器,和notepad操作习惯相同
vim分编辑模式和命令模式。 给个建议:
1 练习VIM。
2 变通一下:在linux 下开个 smb,在windows下访问。用windows下的记事本啊、ultraedit、si等等编辑器来编辑。
postek 发表于 2013-5-3 14:48 static/image/common/back.gif
给个建议:
1 练习VIM。
2 变通一下:在linux 下开个 smb,在windows下访问。用windows下的记事本啊、ultrae ...
按下切换键就没问题了,感觉简单的编辑直接在linux操作就行了,把文件从虚拟机上拖拽到window来编辑感觉好麻烦!对了,你说的smb服务,我没用过,我一向来都是用cuteftppro在两个系统间拖拽文件的,使用smb会更方便吗 yidehui 发表于 2013-5-3 15:05 static/image/common/back.gif
按下切换键就没问题了,感觉简单的编辑直接在linux操作就行了,把文件从虚拟机上拖拽到window来编辑感觉 ...
嗯。会比较方便。
页:
[1]