Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
copy格式的问题?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Fri Dec 17, 2004 12:27 am    Post subject: copy格式的问题? Reply with quote

这个就作为chinese版开办纪念。
我有两台安装gentoo的机器,配置也一样。但是我最新安装的机器上,copy功能不正常。具体表现为,在新的地方粘贴的时候,总是在每行的开头添加一个tab长度的空白,让本来正常的code拷贝过来了,就没有办法看了。但是另外一台机器去没有这个问题。实在是不明白特来请教。怎么处理?3X.

Edit:
- Eric.200412171010: 原贴为非 UTF-8 编码, 已修正.
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Fri Dec 17, 2004 2:19 am    Post subject: Reply with quote

Hi, blackwhite, your previous post was not posted in UTF-8 encoding, so it was unreadable for other people who have set their browsers' encoding to UTF-8, I've edited for you.

This forum's default encoding is UTF-8, to view & post threads properly, you need to set your browser's encoding to UTF-8. Please check this post.

你是在哪些程序之间进行拷贝粘贴? 不同程序间的粘贴是有一些事情需要注意的. 例如, 如果你是从 gtk 程序中拷贝 (例如从 gedit, firefox) 数据, 然后粘贴到 gnome-terminal 下运行的 vi 中, 要让 vi 不会给你每行都自动加一个 tab 缩进, 你需要先在 vi 里: ESC -> : (冒号) -> set noai -> i (切换回输入状态) -> ctrl + shift + v (或者直接鼠标右键 "粘贴")

其中 vi 里 set noai 的意思是: 设置 (set) 为非 (no) 自动 (auto) 缩进 (indent) 方式.

请给出一个出现问题时的实例, 具体说明是从哪个程序拷贝到哪个程序 :)
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Fri Dec 17, 2004 7:04 pm    Post subject: Reply with quote

即使从VI到VI也是会自动缩进的。比知道为什么。另外一台机器就是没有问题。
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Sat Dec 18, 2004 3:52 pm    Post subject: Reply with quote

请问试过 vi 里 set noai 了么? 结果仍旧?
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Sun Dec 19, 2004 2:40 am    Post subject: Reply with quote

EricHsu wrote:
请问试过 vi 里 set noai 了么? 结果仍旧?

结果是一样的。
我的vimrc文件。
Quote:

" initialisation file for vim editor.
" $Header: /home/taviso/.vimrc,v 1.1 2004/05/13 17:40:31 taviso Exp $

set noai nocp digraph ek hid ru sc wmnu noet nosol si
set bs=2 fo=cqrt ls=2 shm=at ww=<,>,h,l ts=4 sw=4
set com=s1:/*,mb:*,ex:*/,://,b:# syn=on filetype=on
set vi=%,'50,\"50,:50 lcs=tab:>-,trail:.,extends:>
set pt=<F5> shm=I tm=750 nomore modelines=5 hls!
syn on

ino <Down> <C-O>gj
ino <Up> <C-O>gk
nno <Down> gj
nno <Up> gk

nno <F2> :set hls!<bar>set hls?<CR>
nno <F3> :syn clear <CR>
nno <F4> :set nu!<bar>set nu?<CR>

if has("gui_running")
colo darkblue
set gfn=Bitstream\ Vera\ Sans\ Mono\ 8
else
colo elflord
endif

但是如果vimrc就一个set noai,这样是不会每行都自动缩进。这说明上面的设定里边有个地方和noai,冲突,不知道上面什么地方?请指正。
谢谢。
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Dec 21, 2004 6:01 am    Post subject: Reply with quote

blackwhite wrote:

我的vimrc文件。
[snip]
但是如果vimrc就一个set noai,这样是不会每行都自动缩进。这说明上面的设定里边有个地方和noai,冲突,不知道上面什么地方?请指正。
谢谢。


sorry, 才回复你, 刚把 glibc locales 的问题彻底解决 ;)
根据你的意思, 看来确实是因为某个 (些) 选项造成了 noai 无效以致 vim 仍旧在粘贴时给你自动缩进了. 关于 vim 的各种设置, 我并不熟悉, 不过解决问题的思路还是有的: 建议你从一个仅含 noai 的 vimrc 开始, 然后逐个添加其他设置, 一个个排除, 最终一定可以找到那个让 noai 失效的设置, 虽说比较笨的办法, 但是应该是有效的 ;)

到时找到了记得回来跟帖告诉我们原因 :)
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum