批处理之家's Archiver

Batcher 发表于 2009-3-3 15:26

免费开源的文本编辑工具 Vim 9.1

软件名称:Vim
最新版本:9.1
体积大小:10.5 MB
更新日期:2024-01-02
使用环境:Windows/DOS/Unix/Amiga/OS/Macintosh/Others
软件性质:免费开源软件/英文
官方主页:[url]http://www.vim.org/index.php[/url]

英语水平不够好的朋友,可以使用在线工具([url]https://fanyi.baidu.com/?fr=allproduct[/url])进行翻译。

After fifteen months of work: a brand new Vim release! This is a stable version. There are many bug fixes and updated runtime files. The only new feature worth mentioning is support for floating point. Upgrading from a previous version is highly recommended: a few crashing bugs and several security issues were fixed. For the details see the announcement. Or go directly to the download page. (Bram Moolenaar)

[color=Blue]What Is Vim?[/color]

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.

Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.

Despite what the above comic suggests, Vim can be configured to work in a very simple (Notepad-like) way, called evim or Easy Vim.

[color=Blue]What Vim Is Not?[/color]

Vim isn't an editor designed to hold its users' hands. It is a tool, the use of which must be learned.

Vim isn't a word processor. Although it can display text with various forms of highlighting and formatting, it isn't there to provide WYSIWYG editing of typeset documents. (It is great for editing TeX, though.)

BBCC 发表于 2009-3-3 19:12

vim也来了...支持一下...最好能贴下如何配置自己的vimrc嘛...

namejm 发表于 2009-3-4 01:19

Vim是个十分强大的文本编辑器,经历了漫长岁月的洗礼,在多如牛毛的文本编辑器中仍然保持着旺盛的生命力,拥有一批骨灰级的忠实用户——出生于1988年的它,年龄恐怕比很多论坛用户都还大吧?

  几次打开Vim,却又屡次不得其门,连TotalCommander这样的BT级别的软件都基本搞定了,却还是有点不太适应Vim的操作方式,真是好事多磨啊,看来得好好学一下了。

  上传一本pdf格式的《Vim7.2中文版用户手册》,与大家一起分享。

BBCC 发表于 2009-3-6 13:33

回复 3楼 的帖子

的确是这样啊。。。但如果掌握了对程序员一类的人来说效率能提升不少.

namejm 发表于 2009-3-8 12:39

[quote]原帖由 [i]BBCC[/i] 于 2009-3-3 19:12 发表 [url=http://bbs.bathome.net/redirect.php?goto=findpost&pid=22508&ptid=3568][img]http://bbs.bathome.net/images/common/back.gif[/img][/url]
vim也来了...支持一下...最好能贴下如何配置自己的vimrc嘛... [/quote]
  帖一个网上Vim高手配置的_vimrc文件配置(出处:[url=http://fayaa.com/code/view/5/]http://fayaa.com/code/view/5/[/url]):
[quote]
[b]set[/b] nocompatible
source $VIMRUNTIME/vimrc_example.[b]vim[/b]
source $VIMRUNTIME/mswin.[b]vim[/b]
behave mswin
[b]set[/b] diffexpr=MyDiff()
[b]function[/b] MyDiff()
  [b]let[/b] [b]opt[/b] = [color=#0000ff]'-a --binary '[/color]
  [b]if[/b] &diffopt =~ [color=#0000ff]'icase'[/color] | [b]let[/b] [b]opt[/b] = [b]opt[/b] . [color=#0000ff]'-i '[/color] | [b]endif[/b]
  [b]if[/b] &diffopt =~ [color=#0000ff]'iwhite'[/color] | [b]let[/b] [b]opt[/b] = [b]opt[/b] . [color=#0000ff]'-b '[/color] | [b]endif[/b]
  [b]let[/b] arg1 = v:fname_in
  [b]if[/b] arg1 =~ [color=#0000ff]' '[/color] | [b]let[/b] arg1 = [color=#0000ff]'"'[/color] . arg1 . [color=#0000ff]'"'[/color] | [b]endif[/b]
  [b]let[/b] arg2 = v:fname_new
  [b]if[/b] arg2 =~ [color=#0000ff]' '[/color] | [b]let[/b] arg2 = [color=#0000ff]'"'[/color] . arg2 . [color=#0000ff]'"'[/color] | [b]endif[/b]
  [b]let[/b] arg3 = v:fname_out
  [b]if[/b] arg3 =~ [color=#0000ff]' '[/color] | [b]let[/b] arg3 = [color=#0000ff]'"'[/color] . arg3 . [color=#0000ff]'"'[/color] | [b]endif[/b]
  [b]if[/b] &[b]sh[/b] =~ [color=#0000ff]'\<cmd'[/color]
    [b]silent[/b] execute [color=#0000ff]'!""C:\Program Files\Vim\vim71\diff" '[/color] . [b]opt[/b] . arg1 . [color=#0000ff]' '[/color] . arg2 . [color=#0000ff]' > '[/color] . arg3 . [color=#0000ff]'"'[/color]
  [b]else[/b]
    [b]silent[/b] execute [color=#0000ff]'!C:\Program" Files\Vim\vim71\diff" '[/color] . [b]opt[/b] . arg1 . [color=#0000ff]' '[/color] . arg2 . [color=#0000ff]' > '[/color] . arg3
  [b]endif[/b]
[b]endfunction[/b]

[b]set[/b] cursorline
[b]set[/b] shiftwidth=[color=#0000ff]4[/color]
[b]set[/b] [b]sts[/b]=[color=#0000ff]4[/color]
[b]set[/b] tabstop=[color=#0000ff]4[/color]
[b]set[/b] expandtab
[b]set[/b] nonu
[b]set[/b] nobackup
[b]set[/b] guioptions-=T
[b]set[/b] guioptions-=[b]m[/b]
[b]set[/b] guifont=Consolas:h12
[color=#008800][i]"set guifont=Bitstream_Vera_Sans_Mono:h10[/i][/color]
[color=#008800][i]"set guifont=Lucida_Console:h10[/i][/color]
[b]set[/b] langmenu=none
[b]language[/b] messages en_us
[b]let[/b] $LANG=[color=#0000ff]'zh'[/color]
[color=#008800][i]"set fileencodings=utf-8,GBK[/i][/color]
[b]set[/b] fileencoding=utf8
[b]set[/b] encoding=utf8
[b]set[/b] tenc=utf8
[b]set[/b] ut=[color=#0000ff]200[/color]

[color=#008800][i]"colorscheme desert[/i][/color]
[b]colorscheme[/b] wombat

map <leader><leader> \[b]be[/b]
map <leader>Enter \vt
map C-Enter C-Tab

[b]let[/b] g:Tlist_Use_Right_Window=[color=#0000ff]1[/color]
[b]let[/b] g:Tlist_Auto_Open=[color=#0000ff]1[/color]
[b]let[/b] g:Tlist_Show_One_File=[color=#0000ff]1[/color]
[b]let[/b] g:Tlist_Compact_Format=[color=#0000ff]1[/color]
[b]let[/b] g:Tlist_Enable_Fold_Column=[color=#0000ff]0[/color]
[b]let[/b] g:treeExplVertical=[color=#0000ff]1[/color]
[b]let[/b] g:treeExplWinSize=[color=#0000ff]30[/color]
[b]let[/b] mapleader = [color=#0000ff]'\'[/color]

[b]set[/b] iskeyword+=.

[b]set[/b] ambiwidth=double
[b]set[/b] ignorecase smartcase
[b]set[/b] [b]so[/b]=[color=#0000ff]7[/color]
au GUIEnter * [b]simalt[/b] ~[b]x[/b]

python << EOF
import time
import [b]vim[/b]
def SetBreakpoint():
    nLine = int( [b]vim[/b].eval( [color=#0000ff]'line(".")'[/color]))
    strLine = [b]vim[/b].current.line
    i = [color=#0000ff]0[/color]
    strWhite = [color=#008800][i]""[/i][/color]
    [b]while[/b] strLine[i] == [color=#0000ff]' '[/color] or strLine == [color=#008800]"\t":[/color]
        i += [color=#0000ff]1[/color]
        strWhite += strLine
    [b]vim[/b].current.buffer.append(
[color=#008800]       "%(space)spdb.set_trace() %(mark)s Breakpoint %(mark)s" %[/color]
         {[color=#0000ff]'space'[/color]:strWhite, [color=#0000ff]'mark'[/color]: [color=#0000ff]'#'[/color] * [color=#0000ff]30[/color]}, nLine - [color=#0000ff]1[/color])
    [b]for[/b] strLine [b]in[/b] [b]vim[/b].current.buffer:
        [b]if[/b] strLine == [color=#008800]"import pdb":[/color]
            [b]break[/b]
        [b]else[/b]:
            [b]vim[/b].current.buffer.append( [color=#0000ff]'import pdb'[/color], [color=#0000ff]0[/color])
            [b]vim[/b].command( [color=#0000ff]'normal j1'[/color])
            [b]break[/b]
[b]vim[/b].command( [color=#0000ff]'map <C-F7> :py SetBreakpoint()<cr>'[/color])

def RemoveBreakpoints():
    nCurrentLine = int( [b]vim[/b].eval( [color=#0000ff]'line(".")'[/color]))
    nLines = []
    nLine = [color=#0000ff]1[/color]
    [b]for[/b] strLine [b]in[/b] [b]vim[/b].current.buffer:
        [b]if[/b] strLine == [color=#0000ff]'import pdb'[/color] or strLine.lstrip()[:[color=#0000ff]15[/color]] == [color=#0000ff]'pdb.set_trace()'[/color]:
            nLines.append( nLine)
        nLine += [color=#0000ff]1[/color]
    nLines.reverse()
    [b]for[/b] nLine [b]in[/b] nLines:
        [b]vim[/b].command( [color=#0000ff]'normal %dG'[/color] % nLine)
        [b]vim[/b].command( [color=#0000ff]'normal dd'[/color])
        [b]if[/b] nLine < nCurrentLine:
            nCurrentLine -= [color=#0000ff]1[/color]
    [b]vim[/b].command( [color=#0000ff]'normal %dG'[/color] % nCurrentLine)
[b]vim[/b].command( [color=#0000ff]'map <C-F8> :py RemoveBreakpoints()<cr>'[/color])
[b]vim[/b].command( [color=#0000ff]'map <C-D> :!python %<cr>'[/color])
EOF

[color=#008800]"Set some bindings up for 'compile' of python[/color]
[color=#008800]"au BufNewFile,BufRead *.py :set makeprg=python\ %[/color]
[color=#008800]"au BufNewFile,BufRead *.py :set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m[/color]
[color=#008800]"au BufNewFile,BufRead *.py nmap <buffer> <F8> :up!<cr>:make<cr>[/color]
[color=#008800]"au BufNewFile,BufRead *.py vmap <buffer> <F8> :<c-u>up!<cr>:make<cr>[/color]
[color=#008800]"au BufNewFile,BufRead *.py nmap <buffer> <F12> :cl<cr>[/color]

[/quote]

[/i]  再上传一个这位高手已经配置好了的Vim 7.1(出处:[url=http://www.2maomao.com/blog/vim-7-pack-configured/]http://www.2maomao.com/blog/vim-7-pack-configured/[/url],下载地址:[url=http://www.2maomao.com/files/Vim.7z][color=#0000cc]http://www.2maomao.com/files/Vim.7z[/color][/url])
[b]插件列表[/b]:[code]a.vim : 同目录cpp/c与对应的.h文件之间切换,根据文件名
bufexplorer.vim : 用来切换buffer,修改过,改动了启动方式
comments.vim : 注释插件,在正常模式cm即可注释一行,v模式选中之后cm注释很多行,cu取消
matchit.vim : 对映大中小括号,#if等等等之间用%跳转
supertab.vim : 插入模式Tab补齐,Ctrl+N毕竟比较烦
tabswitch.vim : 我写的,使用以后可以ctrl+hjkl,在窗口之间跳转,用Ctrl+Tab可以切换buffer
taglist.vim : 显示多个tag的方式,修改过,现在针对一个文件显示比较简洁
vtreeexplorer.vim : 显示文件系统树[/code][b]针对性的vimrc文件设置:[/b][code]set cursorline " 当前光标所在行会有阴影

"tab转空格的一坨设置
set shiftwidth=4
set sts=4
set tabstop=4
set expandtab

set nonu " 不要行号
set nobackup " 不要备份
set guioptions-=T " 不要工具条
set guifont=Bitstream_Vera_Sans_Mono:h10 " Bitstream字体

set ut=200 " 更新时间200毫秒,针对taglist插件

let mapleader = '\' " leader用反斜杠\
map <leader><leader> \be " 双反斜杠\\即可打开bufexplorer
map C-Enter C-Tab " Ctrl+Enter也可以切换buffer

"Taglist插件的一坨设置
let g:Tlist_Use_Right_Window=1
let g:Tlist_Auto_Open=1
let g:Tlist_Show_One_File=1
let g:Tlist_Compact_Format=1
let g:Tlist_Enable_Fold_Column=0

"Tree explorer的一坨设置
let g:treeExplVertical=1
let g:treeExplWinSize=30

"gvim打开以后最大化
au GUIEnter * simalt ~x

"smartcase,这样搜索时默认不区分大小写,只有搜索关键字中出现一个大字母时才区分大小写
set ignorecase smartcase
"光标在窗口上下边界时距离边界7行即开始滚屏
set so=7[/code]

tanrongjuan 发表于 2009-8-5 10:10

谢谢楼主的分享啊!!!

Bernie 发表于 2010-8-15 16:56

谢谢分享
这个编辑器适合初学者用吗?

ge_xin_yu 发表于 2010-10-16 19:57

这个编辑器听说很强大,但界面实在是不敢恭维。。。。。。

w6680664 发表于 2010-10-24 15:19

这个是给极客用的 嘿嘿

fanfande 发表于 2010-10-28 12:08

听说确实不错的!   对程序员

Batcher 发表于 2012-3-10 19:13

升级到7.3喽[img]http://www.bathome.net/images/smilies/default/lol.gif[/img]

我来了 发表于 2013-1-18 14:58

[quote]升级到7.3喽
[size=2][color=#999999]Batcher 发表于 2012-3-10 19:13[/color] [url=http://www.bathome.net/redirect.php?goto=findpost&pid=104049&ptid=3568][img]http://www.bathome.net/images/common/back.gif[/img][/url][/size][/quote]


    管理员,您OUT了,好像最新的是7.6~~~
快来升级吧。

我来了 发表于 2013-1-18 15:05

[color=#0000ff]gvim73_46.exe[/color]
ftp://ftp.vim.org/pub/vim/pc/gvim73_46.exe

Batcher 发表于 2013-1-18 17:02

[b]回复 [url=http://www.bathome.net/redirect.php?goto=findpost&pid=124767&ptid=3568]14#[/url] [i]我来了[/i] [/b]


    顶楼已更新,感谢提醒。

raeppa 发表于 2024-2-4 20:40

:) 这个现在还有人用吗?

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.