免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: lovesaka
打印 上一主题 下一主题

[共享交流]请交出你的vimrc [复制链接]

论坛徽章:
0
31 [报告]
发表于 2006-09-14 13:10 |只看该作者
在默认的基础上增加了如下内容:
set number
set hlsearch
set ts=4
set shiftwidth=4
set nobackup
set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936

论坛徽章:
0
32 [报告]
发表于 2006-09-14 14:09 |只看该作者
我的和你的差不多。。。

论坛徽章:
0
33 [报告]
发表于 2006-09-15 01:10 |只看该作者
原帖由 dlms 于 2006-9-14 09:18 发表
你们用的都是什么版本啊!这些都咋用啊!俺一直就用vim当记事本用!

高手一般都是把VIM当记事本用
差不多都是7点几吧

论坛徽章:
0
34 [报告]
发表于 2006-09-15 10:23 |只看该作者
taglist都需要那些配置?
文档看不明白

论坛徽章:
0
35 [报告]
发表于 2006-09-15 14:09 |只看该作者
原帖由 playmud 于 2006-9-15 10:23 发表
taglist都需要那些配置?
文档看不明白

几乎可以说不用什么配置
我是直接把包解开然后把taglist.vim文件放到VIM安装目录下的plugin目录
再到vimrc里加上一句

  1. nnoremap <silent> <F8> :TlistToggle<CR>
复制代码

按F8就可以用了

论坛徽章:
0
36 [报告]
发表于 2006-09-15 15:59 |只看该作者
我的,比较简单,个人觉得很好用,注释都加上了

  1. if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
  2.    set fileencodings=utf-8,latin1
  3. endif

  4. set nocompatible        " Use Vim defaults (much better!)
  5. set bs=2                " allow backspacing over everything in insert mode
  6. set ai                  " always set autoindenting on
  7. "set backup             " keep a backup file
  8. set viminfo='20,\"50    " read/write a .viminfo file, don't store more
  9.                         " than 50 lines of registers
  10. set history=50          " keep 50 lines of command line history
  11. set ruler               " show the cursor position all the time
  12. set number              " show the number of lines
  13. set showcmd             " show the cmd
  14. set whichwrap=b,s,<,>   " can use Backspace Space <Left> <Right> wrap
  15. "set mouse=a             " use mouse in terminal
  16. set helplang=cn         " set the vim helpdoc language
  17. set noignorecase        " set case not sensitivity

  18. vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc>          " can paste in the VISUAL mode
  19. filetype plugin indent off

  20. " Only do this part when compiled with support for autocommands
  21. if has("autocmd")
  22.   " In text files, always limit the width of text to 78 characters
  23.   autocmd BufRead *.txt set tw=78
  24.   " When editing a file, always jump to the last cursor position
  25.   autocmd BufReadPost *
  26.   \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  27.   \   exe "normal g'\"" |
  28.   \ endif
  29. endif

  30. " Switch syntax highlighting on, when the terminal has colors
  31. " Also switch on highlighting the last used search pattern.
  32. if &t_Co > 2 || has("gui_running")
  33.   syntax on
  34.   set hlsearch
  35. endif

  36. if &term=="xterm"
  37.      set t_Co=8
  38.      set t_Sb=^[4%dm
  39.      set t_Sf=^[3%dm
  40. endif

  41. " Open a file managers
  42. map <F7> <ESC>:vsplit<ENTER>:edit `pwd`<ENTER>i

  43. " Open Tlist
  44. map <F8> <ESC>:Tlist<ENTER>
  45. " Close Tlist width resize
  46. let Tlist_Inc_Winwidth=0

  47. " use Alt+; to add comment,like emacs
  48. autocmd filetype cpp,java map <Esc>; $a<tab><tab>//
  49. autocmd filetype cpp,java imap <Esc>; <End><tab><tab>//
  50. autocmd filetype c map <Esc>; $a<tab><tab>/*   */<Esc>3hi
  51. autocmd filetype c imap <Esc>; <End><tab><tab>/*   */<Left><Left><Left><Left>
  52. autocmd filetype sh map <Esc>; O#
复制代码

论坛徽章:
0
37 [报告]
发表于 2006-09-15 22:48 |只看该作者

不错如果以后不小心把vimrc文件给毁了到这上面来copy下去还是很便的哈哈

论坛徽章:
0
38 [报告]
发表于 2006-09-16 02:07 |只看该作者
修改一下加了一个目录浏览vim自带的功能不过在taglist里面用f键就可以看当前目录
多谢谢楼上兄第脚本提示
小提示:在文件管理器下直接ex可以打开文件比如播放音乐,看电子书等等爽得不得了不过还得要你系统上有文件格式相关连的软件才行

[ 本帖最后由 lovesaka 于 2006-9-16 02:30 编辑 ]

抓图10.png (76.32 KB, 下载次数: 71)

图1

图1

抓图11.png (74.66 KB, 下载次数: 72)

图2

图2

taglist.tar

140 KB, 下载次数: 271

修改过后taglist

论坛徽章:
0
39 [报告]
发表于 2006-09-16 10:48 |只看该作者
想做一个像vc那样的函数原形显示窗口最好和VIM补全的窗口差不多
却一直下不了手
知道的兄弟给点不妨给点提示

论坛徽章:
0
40 [报告]
发表于 2006-09-17 02:49 |只看该作者
上面所说的要求并非空谈我看到有人在WINDOW下用MFC实现这个功能
所以自己想在LINUX写一个那东西

看来此贴生命周期已了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP