[问题]vim的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

[问题]vim的问题

#1

帖子 nany » 2008-06-15 21:08

ubuntu8.04自己就带了vim,请教下 .vimrc在哪个目录下?
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#2

帖子 BigSnake.NET » 2008-06-15 21:09

自己建
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#3

帖子 eexpress » 2008-06-15 21:10

touch ~/.vimrc
● 鸣学
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#4

帖子 BigSnake.NET » 2008-06-15 21:12

eexpress 写了:touch ~/.vimrc
Linux Server Hacks 里介绍的方法...

代码: 全选

 > ~/.vimrc 
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
hubert_star
论坛版主
帖子: 5373
注册时间: 2007-10-29 22:12
系统: OSX 10.9 + Ub 1304
来自: 江苏南京

#5

帖子 hubert_star » 2008-06-15 21:13

代码: 全选

 > ~/.vimrc 
[/quote]

超经典的做法,还有很多,这帮牛人真的不是吃干饭的,他们肯定是啃面包出来的。
佛经说,人有八苦: 生、老、病、死、求不得、怨憎、爱别离、五阴盛 故我苦!
圣经说,人有七罪: 饕餮、贪婪、懒惰、淫欲、傲慢、嫉妒和暴怒  故我有罪!

我这篇帖子里面没有任何攻击我们伟大的中华人民共和国政府和任劳任怨的人民公仆(和本论坛高素质的版主)的文字和含义;

特此声明!

有些事,我们明知道是错的,也要去坚持,因为不甘心;有些人,我们明知道是爱的,也要去放弃,因为没结局;有时候,我们明知道没路了,却还在前行,因为习惯了。

欢迎来我的新浪微博@me
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#6

帖子 nany » 2008-06-15 21:19

谢谢啊,知道怎么配置php语法么?
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#7

帖子 nany » 2008-06-15 21:24

还有我vim xx.php
会提示:

代码: 全选

line    4:
E319: Sorry, the command is not available in this version: filetype on
line    6:
E319: Sorry, the command is not available in this version: filetype plugin on
line    8:
E185: Cannot find color scheme pablo
line    9:
E319: Sorry, the command is not available in this version: syntax on 
line   26:
E538: No mouse support: mouse=a
line   32:
E319: Sorry, the command is not available in this version: func! CompileRunGplusplus() 
line   33:
E319: Sorry, the command is not available in this version: exec "w" 
line   34:
E319: Sorry, the command is not available in this version: exec "!g++ % -g -o %<" 
line   35:
E319: Sorry, the command is not available in this version: exec "! ./%<" 
line   36:
E319: Sorry, the command is not available in this version: endfunc 
line   38:
E319: Sorry, the command is not available in this version: fun! DebugGplusplus() 
line   39:
E319: Sorry, the command is not available in this version: exec "!g++ % -g -o %<" 
line   40:
E319: Sorry, the command is not available in this version: exec "! gdb %<" 
line   41:
E319: Sorry, the command is not available in this version: endfun

vim 版本问题?
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#8

帖子 BigSnake.NET » 2008-06-15 21:25

装 vim-full
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#9

帖子 nany » 2008-06-15 21:30

BigSnake.NET 写了:装 vim-full

sudo apt-get install vim-full

我下了1下午,结果告诉我:

代码: 全选

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
Reading state information... 完成      
将会安装下列额外的软件包:
  libruby1.8 vim-gnome vim-gui-common vim-runtime
建议安装的软件包:
  cscope vim-doc
下列【新】软件包将被安装:
  libruby1.8 vim-full vim-gnome vim-gui-common vim-runtime
共升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 147 个软件未被升级。
需要下载 8040kB 的软件包。
After this operation, 31.4MB of additional disk space will be used.
您希望继续执行吗?[Y/n]y
获取:1 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]
获取:2 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]                                      
获取:3 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]       
获取:4 http://cn.archive.ubuntu.com hardy/main vim-gui-common 1:7.1-138+1ubuntu3 [151kB]   
获取:5 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:6 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:7 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:8 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:9 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:10 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:11 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:12 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:13 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:14 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:15 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
错误 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3       
无法连接上 cn.archive.ubuntu.com:80 (222.73.255.64)。 - connect (111 Connection refused)
获取:16 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       
获取:17 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       
29% [17 vim-gnome 858906/958kB 89%]                                                                        238B/s 6h35min49sg获取:18 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       1
获取:19 http://cn.archive.ubuntu.com hardy/universe vim-full 1:7.1-138+1ubuntu3 [73.9kB]                                   
下载 439kB,耗时 2h8min3s (57B/s)                                                                                           
无法下载 http://cn.archive.ubuntu.com/ubuntu/pool/main/v/vim/vim-runtime_7.1-138+1ubuntu3_all.deb  无法连接上 cn.archive.ubuntu.com:80 (222.73.255.64)。 - connect (111 Connection refused)
E: 有几个软件包无法下载,您可以运行 apt-get update 或者加上 --fix-missing 的选项再试试?

头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#10

帖子 BigSnake.NET » 2008-06-15 21:31

.. 换源 .
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#11

帖子 nany » 2008-06-15 21:33

现在换什么源好呢?
能给个url么?
我找了几个都部好使啊
yexiaoxing
帖子: 499
注册时间: 2008-05-09 17:02
系统: Ubuntu 13.04
联系:

#12

帖子 yexiaoxing » 2008-06-15 21:33

nany 写了:
BigSnake.NET 写了:装 vim-full

sudo apt-get install vim-full

我下了1下午,结果告诉我:

代码: 全选

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
Reading state information... 完成      
将会安装下列额外的软件包:
  libruby1.8 vim-gnome vim-gui-common vim-runtime
建议安装的软件包:
  cscope vim-doc
下列【新】软件包将被安装:
  libruby1.8 vim-full vim-gnome vim-gui-common vim-runtime
共升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 147 个软件未被升级。
需要下载 8040kB 的软件包。
After this operation, 31.4MB of additional disk space will be used.
您希望继续执行吗?[Y/n]y
获取:1 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]
获取:2 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]                                      
获取:3 http://cn.archive.ubuntu.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]       
获取:4 http://cn.archive.ubuntu.com hardy/main vim-gui-common 1:7.1-138+1ubuntu3 [151kB]   
获取:5 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:6 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:7 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:8 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:9 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]     
获取:10 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:11 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:12 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:13 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:14 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
获取:15 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]                                    
错误 http://cn.archive.ubuntu.com hardy/main vim-runtime 1:7.1-138+1ubuntu3       
无法连接上 cn.archive.ubuntu.com:80 (222.73.255.64)。 - connect (111 Connection refused)
获取:16 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       
获取:17 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       
29% [17 vim-gnome 858906/958kB 89%]                                                                        238B/s 6h35min49sg获取:18 http://cn.archive.ubuntu.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB]                                       1
获取:19 http://cn.archive.ubuntu.com hardy/universe vim-full 1:7.1-138+1ubuntu3 [73.9kB]                                   
下载 439kB,耗时 2h8min3s (57B/s)                                                                                           
无法下载 http://cn.archive.ubuntu.com/ubuntu/pool/main/v/vim/vim-runtime_7.1-138+1ubuntu3_all.deb  无法连接上 cn.archive.ubuntu.com:80 (222.73.255.64)。 - connect (111 Connection refused)
E: 有几个软件包无法下载,您可以运行 apt-get update 或者加上 --fix-missing 的选项再试试?

我的和你不同,成功了。试试用Cn99。

代码: 全选

ubuntu@ubuntu-desktop:~$ sudo apt-get install vim-full
[sudo] password for ubuntu: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
读取状态信息... 完成             
将会安装下列额外的软件包:
  libruby1.8 vim-gnome vim-gui-common vim-runtime
建议安装的软件包:
  cscope vim-doc
下列【新】软件包将被安装:
  libruby1.8 vim-full vim-gnome vim-gui-common vim-runtime
共升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 8040kB 的软件包。
操作完成后,会消耗掉 31.4MB 的额外磁盘空间。
您希望继续执行吗?[Y/n]y
获取:1 http://ubuntu.cn99.com hardy/main libruby1.8 1.8.6.111-2ubuntu1 [1385kB]
获取:2 http://ubuntu.cn99.com hardy/main vim-gui-common 1:7.1-138+1ubuntu3 [151kB]
获取:3 http://ubuntu.cn99.com hardy/main vim-runtime 1:7.1-138+1ubuntu3 [5473kB]
获取:4 http://ubuntu.cn99.com hardy/main vim-gnome 1:7.1-138+1ubuntu3 [958kB] 
获取:5 http://ubuntu.cn99.com hardy/universe vim-full 1:7.1-138+1ubuntu3 [73.9kB]
下载 8040kB,耗时 28s (286kB/s)                                                
选中了曾被取消选择的软件包 libruby1.8。
(正在读取数据库 ... 系统当前总共安装有 156685 个文件和目录。)
正在解压缩 libruby1.8 (从 .../libruby1.8_1.8.6.111-2ubuntu1_i386.deb) ...
选中了曾被取消选择的软件包 vim-gui-common。
正在解压缩 vim-gui-common (从 .../vim-gui-common_1%3a7.1-138+1ubuntu3_all.deb) ...
选中了曾被取消选择的软件包 vim-runtime。
正在解压缩 vim-runtime (从 .../vim-runtime_1%3a7.1-138+1ubuntu3_all.deb) ...
正在替换原软件包中的文件 vim-tiny ...
选中了曾被取消选择的软件包 vim-gnome。
正在解压缩 vim-gnome (从 .../vim-gnome_1%3a7.1-138+1ubuntu3_i386.deb) ...
选中了曾被取消选择的软件包 vim-full。
正在解压缩 vim-full (从 .../vim-full_1%3a7.1-138+1ubuntu3_all.deb) ...
正在设置 libruby1.8 (1.8.6.111-2ubuntu1) ...

正在设置 vim-gui-common (1:7.1-138+1ubuntu3) ...

正在设置 vim-runtime (1:7.1-138+1ubuntu3) ...
Processing /usr/share/vim/addons/doc

正在设置 vim-gnome (1:7.1-138+1ubuntu3) ...

正在设置 vim-full (1:7.1-138+1ubuntu3) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#13

帖子 nany » 2008-06-15 21:39

ls 能把源铁给我么?谢谢了
头像
nany
帖子: 86
注册时间: 2008-06-12 19:49

#14

帖子 nany » 2008-06-15 22:01

代码: 全选

##中国台湾 台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题): 

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse 
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse 
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse 
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse 
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse 
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse 
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse 
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse 
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe 
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse 

aofeng
帖子: 1
注册时间: 2010-12-11 14:57

Re:

#15

帖子 aofeng » 2010-12-11 15:06

nany 写了:还有我vim xx.php
会提示:

代码: 全选

line    4:
E319: Sorry, the command is not available in this version: filetype on
line    6:
E319: Sorry, the command is not available in this version: filetype plugin on
line    8:
E185: Cannot find color scheme pablo
line    9:
E319: Sorry, the command is not available in this version: syntax on 
line   26:
E538: No mouse support: mouse=a
line   32:
E319: Sorry, the command is not available in this version: func! CompileRunGplusplus() 
line   33:
E319: Sorry, the command is not available in this version: exec "w" 
line   34:
E319: Sorry, the command is not available in this version: exec "!g++ % -g -o %<" 
line   35:
E319: Sorry, the command is not available in this version: exec "! ./%<" 
line   36:
E319: Sorry, the command is not available in this version: endfunc 
line   38:
E319: Sorry, the command is not available in this version: fun! DebugGplusplus() 
line   39:
E319: Sorry, the command is not available in this version: exec "!g++ % -g -o %<" 
line   40:
E319: Sorry, the command is not available in this version: exec "! gdb %<" 
line   41:
E319: Sorry, the command is not available in this version: endfun

vim 版本问题?

看一下我的这篇文章:VIM - 安装C/C++开发插件 | VIM - Install plugin cvim for develop C/C++
http://aofengblog.blog.163.com/blog/sta ... 112956630/

里面的附录部分有解决 the command is not available in this version: filetype plugin on 的说明。
回复