请教各位vim 大神配置,vim下的这条线怎么去掉

请教一下各位大神删除线怎么去掉【java吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:706,552贴子:
请教一下各位大神删除线怎么去掉收藏
如图所示,这个删除线怎么去掉啊,弄了很久也去不掉
你的就jdk版本太高
导致他过期了
过时的方法,但是能用
这个线表示方法过时了,但是还是能用。不用管他
你继承的类已经加了注解@deperacation
过时了,过时了就是叫你不要用这个类了,一般都会有新的类代替,你去找找,用新的类
你知道这道线的作用是什么么,上来就要去掉
登录百度帐号24小时热门版块排行榜&&&&
【悬赏金币】回答本帖问题,作者wzf_wzf将赠送您 10 个金币
(著名写手)
散金: 1773
在线: 88.6小时
虫号: 1363899
注册: 性别: GG专业: 无机非金属基复合材料
请教各位大神,组装后电池的静置是必须的嘛?静置的时间如何确定?已有14人参与
& 猜你喜欢
已经有6人回复
已经有0人回复
已经有94人回复
已经有0人回复
已经有2人回复
已经有1人回复
已经有0人回复
已经有1人回复
已经有2人回复
已经有2人回复
& 本主题相关商家推荐:
& 本主题相关价值贴推荐,对您同样有帮助:
已经有38人回复
已经有1人回复
已经有0人回复
已经有11人回复
已经有16人回复
(小有名气)
在线: 146.4小时
虫号: 1512198
注册: 性别: GG专业: 电化学
引用回帖:: Originally posted by wzf_wzf at
谢谢回复!请问放这么久,电解液不会干掉吗?我做的是水体系的,感觉稍微拿出来晾晾,很容易就干了
... 水系电池不用密封吗?扣式封口以后不会密封性还可以
相关版块跳转
SciFinder/Reaxys
我要订阅楼主
的主题更新
小木虫,学术科研互动社区,为中国学术科研免费提供动力
违规贴举报删除请发送邮件至:
广告投放与宣传请联系 李想 QQ:
QQ:&&邮箱:
Copyright &
MuChong.com, All Rights Reserved. 小木虫 版权所有Vim自动补全神器:YouCompleteMe - 文章 - 伯乐在线
& Vim自动补全神器:YouCompleteMe
第一次听说这个插件还是在偶然的情况下看到别人的博客,听说了这个插件的大名。本来打算在实训期间来完成安装的,无奈网实在不给力,也就拖到了回家的时候。在开始准备工作的时候就了解到这个插件不是很容易安装,安装的时候果然名不虚传。(关于这方面的内容,请查看另一篇文章)不过,有付出总有回报,安装之后用上这个插件,真心为这个插件的强大所折服。
那这个插件有何不同?
YouCompleteMe的特别之处
基于语义补全
总所周知,Vim是一款文本编辑器。也就是说,其最基础的工作就是编辑文本,而不管该文本的内容是什么。在Vim被程序员所使用后,其慢慢的被肩负了与IDE一样的工作,文本自动补全(ie.acp,omnicppcompleter),代码检查(Syntastic)等等工作。
针对文本自动补全这个功能来说,主要有两种实现方式。
我们常用的omnicppcompleter,acp,vim自带的c-x, c-n的实现方式就是基于文本。更通俗的说法,其实就是一个字:
其通过文本进行一些正则表达式的匹配,再根据生成的tags(利用ctags生成)来实现自动补全的效果。
顾名思义,其是通过分析源文件,经过语法分析以后进行补全。由于对源文件进行分析,基于语义的补全可以做到很精确。但是这显然是vim所不可能支持的。而且经过这么多年发展,由于语法分析有很高的难度,也一直没有合适的工具出现。直到,由apple支持的clang/llvm横空出世。YouCompleteMe也正是在clang/llvm的基础上进行构建的。
整合实现了多种插件
clang_complete
AutoComplPop
neocomplcache
(类似功能,仅仅针对c/c++/obj-c代码)
对于其他的语言,会调用vim设置的omnifunc来匹配,因此同样支持php,ruby等语言。
已知的有 * javascript —- * ruby/java —-
使用效果图
和IDE一样,自动补全,
根据include的文件进行补全
不用再蹩脚的生成tags
补全非常精准,而且速度很快,不会有延迟(以前在大项目上,acp用起来实在是很卡)
支持类似tags的跳转,跳到定义处以及使用处
出错提示很智能,并且用起来真的是如丝般柔滑,不用输入:w进行强制检测
说完了那么多好处,就要说到安装了。不同于以往其他vim插件,YCM是一款编译型的插件。在下载完后,需要手动编译后才能使用。对应其他的插件来说,仅仅就是把.vim的文件丢到相应文件夹下就可以。而这也加大了使用YCM的难度。
最新版的Vim(7.3.584+),编译时添加+python标志(已经安装的可以通过vim --version查看)
cmake(mac可以通过安装,brew install cmake,ubuntu可以通过sudo apt-get install cmake)
安装插件,用于安装管理vim的插件
mac下快速安装
在.vimrc中添加下列代码
Bundle 'Valloric/YouCompleteMe'
Bundle 'Valloric/YouCompleteMe'
保存退出后打开vim,在正常模式下输入
:BundleInstall
:BundleInstall
等待vundle将YouCompleteMe安装完成
而后进行编译安装:
cd ~/.vim/bundle/YouCompleteMe
./install --clang-completer
cd ~/.vim/bundle/YouCompleteMe./install --clang-completer
如果不需要c-family的补全,可以去掉--clang-completer。如果需要c#的补全,请加上--omnisharp-completer。
正常来说,YCM会去下载clang的包,如果已经有,也可以用系统--system-libclang。
就这样,安装结束。打开vim,如果没有提示YCM未编译,则说明安装已经成功了。
手动编译安装
安装的脚本并不是什么时候都好用,至少对我来说是这样的。安装完之后出现了问题,参考。
在用:BundleInstall安装完成或者使用
git clone --recursive https://github.com/Valloric/YouCompleteMe.git
git clone --recursive https://github.com/Valloric/YouCompleteMe.git
获取最新的仓库,而后使用git submodule update --init --recursive确认仓库的完整性后,开始安装流程。
下载最新的clang二进制文件 YCM要求clang版本 & 3.2,一般来说都是。
安装python-dev.(ubuntu下使用sudo apt-get install python-dev,mac下默认提供,否则请安装)
mkdir ycm_build
cd ycm_build
cmake -G “Unix Makefiles” -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/cpp make ycm_support_libs
cd ~mkdir ycm_buildcd ycm_buildcmake -G “Unix Makefiles” -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/cpp make ycm_support_libs
这里需要注意的是,~/ycm_temp/llvm_root_dir中包含的是根据第一步下载的压缩包解压出来的内容(包括include, bin等等文件)。
这样就完成了,开始感受YCM提供的完全不逊色于大型IDE所提供的自动补全功能吧。
不同于很多vim插件,YCM首先需要编译,另外还需要有配置。在vim启动后,YCM会找寻当前路径以及上层路径的.ycm_extra_conf.py.在~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py中提供了默认的模板。也可以参考我的(就在模板上改改而已)。不过这个解决了标准库提示找不到的问题。
一般来说,我会在~目录下放一个默认的模板,而后再根据不同的项目在当前目录下再拷贝个.ycm_extra_conf.py。
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
# Here's the license text for this file:
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# For more information, please refer to &http://unlicense.org/&
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
'-Wextra',
#'-Werror',
#'-Wc++98-compat',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-stdlib=libc++',
# THIS IS IMPORTANT! Without a "-std=&something&" flag, clang won't know which
# language to use when compiling headers. So it will guess. Badly. So C++
# headers will be compiled as C headers. You don't want that so ALWAYS specify
# a "-std=&something&".
# For a C project, you would set this to something like 'c99' instead of
# 'c++11'.
'-std=c++11',
# ...and the same thing goes for the magic -x option which specifies the
# language that the files to be compiled are written in. This is mostly
# relevant for c++ headers.
# For a C project, you would set this to 'c' instead of 'c++'.
'-isystem',
'/usr/include',
'-isystem',
'/usr/local/include',
'-isystem',
'/Library/Developer/CommandLineTools/usr/include',
'-isystem',
'/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1',
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
# Most projects will NOT need to
you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
if os.path.exists( compilation_database_folder ):
database = ycm_core.CompilationDatabase( compilation_database_folder )
database = None
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
if not working_directory:
return list( flags )
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
if flag.startswith( path_flag ):
path = flag[ len( path_flag ): ]
new_flag = path_flag + os.path.join( working_directory, path )
if new_flag:
new_flags.append( new_flag )
return new_flags
def IsHeaderFile( filename ):
extension = os.path.splitext( filename )[ 1 ]
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
def GetCompilationInfoForFile( filename ):
# The compilation_commands.json file generated by CMake does not have entries
# for header files. So we do our best by asking the db for flags for a
# corresponding source file, if any. If one exists, the flags for that file
# should be good enough.
if IsHeaderFile( filename ):
basename = os.path.splitext( filename )[ 0 ]
for extension in SOURCE_EXTENSIONS:
replacement_file = basename + extension
if os.path.exists( replacement_file ):
compilation_info = database.GetCompilationInfoForFile(
replacement_file )
if compilation_info.compiler_flags_:
return compilation_info
return None
return database.GetCompilationInfoForFile( filename )
def FlagsForFile( filename, **kwargs ):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = GetCompilationInfoForFile( filename )
if not compilation_info:
return None
final_flags = MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_ )
# NOTE: This is just for YouCompleteMe; it's highly likely that your project
# does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
# ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.
final_flags.remove( '-stdlib=libc++' )
#except ValueError:
relative_to = DirectoryOfThisScript()
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
'flags': final_flags,
'do_cache': True
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
# This file is NOT licensed under the GPLv3, which is the license for the rest# of YouCompleteMe.## Here's the license text for this file:## This is free and unencumbered software released into the public domain.## Anyone is free to copy, modify, publish, use, compile, sell, or# distribute this software, either in source code form or as a compiled# binary, for any purpose, commercial or non-commercial, and by any# means.## In jurisdictions that recognize copyright laws, the author or authors# of this software dedicate any and all copyright interest in the# software to the public domain. We make this dedication for the benefit# of the public at large and to the detriment of our heirs and# successors. We intend this dedication to be an overt act of# relinquishment in perpetuity of all present and future rights to this# software under copyright law.## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR# OTHER DEALINGS IN THE SOFTWARE.## For more information, please refer to &http://unlicense.org/&&import osimport ycm_core&# These are the compilation flags that will be used in case there's no# compilation database set (by default, one is not set).# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.flags = ['-Wall','-Wextra',#'-Werror',#'-Wc++98-compat','-Wno-long-long','-Wno-variadic-macros','-fexceptions','-stdlib=libc++',# THIS IS IMPORTANT! Without a "-std=&something&" flag, clang won't know which# language to use when compiling headers. So it will guess. Badly. So C++# headers will be compiled as C headers. You don't want that so ALWAYS specify# a "-std=&something&".# For a C project, you would set this to something like 'c99' instead of# 'c++11'.'-std=c++11',# ...and the same thing goes for the magic -x option which specifies the# language that the files to be compiled are written in. This is mostly# relevant for c++ headers.# For a C project, you would set this to 'c' instead of 'c++'.'-x','c++','-I','.','-isystem','/usr/include','-isystem','/usr/local/include','-isystem','/Library/Developer/CommandLineTools/usr/include','-isystem','/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1',]&# Set this to the absolute path to the folder (NOT the file!) containing the# compile_commands.json file to use that instead of 'flags'. See here for# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html## Most projects will NOT need to
you can just change the# 'flags' list of compilation flags. Notice that YCM itself uses that approach.compilation_database_folder = ''&if os.path.exists( compilation_database_folder ):&&database = ycm_core.CompilationDatabase( compilation_database_folder )else:&&database = None&SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]&def DirectoryOfThisScript():&&return os.path.dirname( os.path.abspath( __file__ ) )&def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):&&if not working_directory:&&&&return list( flags )&&new_flags = []&&make_next_absolute = False&&path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]&&for flag in flags:&&&&new_flag = flag&&&&&if make_next_absolute:&&&&&&make_next_absolute = False&&&&&&if not flag.startswith( '/' ):&&&&&&&&new_flag = os.path.join( working_directory, flag )&&&&&for path_flag in path_flags:&&&&&&if flag == path_flag:&&&&&&&&make_next_absolute = True&&&&&&&&break&&&&&&&if flag.startswith( path_flag ):&&&&&&&&path = flag[ len( path_flag ): ]&&&&&&&&new_flag = path_flag + os.path.join( working_directory, path )&&&&&&&&break&&&&&if new_flag:&&&&&&new_flags.append( new_flag )&&return new_flags&def IsHeaderFile( filename ):&&extension = os.path.splitext( filename )[ 1 ]&&return extension in [ '.h', '.hxx', '.hpp', '.hh' ]&def GetCompilationInfoForFile( filename ):&&# The compilation_commands.json file generated by CMake does not have entries&&# for header files. So we do our best by asking the db for flags for a&&# corresponding source file, if any. If one exists, the flags for that file&&# should be good enough.&&if IsHeaderFile( filename ):&&&&basename = os.path.splitext( filename )[ 0 ]&&&&for extension in SOURCE_EXTENSIONS:&&&&&&replacement_file = basename + extension&&&&&&if os.path.exists( replacement_file ):&&&&&&&&compilation_info = database.GetCompilationInfoForFile(&&&&&&&&&&replacement_file )&&&&&&&&if compilation_info.compiler_flags_:&&&&&&&&&&return compilation_info&&&&return None&&return database.GetCompilationInfoForFile( filename )&def FlagsForFile( filename, **kwargs ):&&if database:&&&&# Bear in mind that compilation_info.compiler_flags_ does NOT return a&&&&# python list, but a "list-like" StringVec object&&&&compilation_info = GetCompilationInfoForFile( filename )&&&&if not compilation_info:&&&&&&return None&&&&&final_flags = MakeRelativePathsInFlagsAbsolute(&&&&&&compilation_info.compiler_flags_,&&&&&&compilation_info.compiler_working_dir_ )&&&&&# NOTE: This is just for YouCompleteMe; it's highly likely that your project&&&&# does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR&&&&# ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.&&&&#try:&&&&#&&final_flags.remove( '-stdlib=libc++' )&&&&#except ValueError:&&&&#&&pass&&else:&&&&relative_to = DirectoryOfThisScript()&&&&final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )&&&return {&&&&'flags': final_flags,&&&&'do_cache': True&&}
YouCompleteMe提供的其他功能
YCM除了提供了基本的补全功能,自动提示错误的功能外,还提供了类似tags的功能:
跳转到定义GoToDefinition
跳转到声明GoToDeclaration
以及两者的合体GoToDefinitionElseDeclaration
可以在.vimrc中配置相应的快捷键。
nnoremap &leader&gl :YcmCompleter GoToDeclaration&CR&
nnoremap &leader&gf :YcmCompleter GoToDefinition&CR&
nnoremap &leader&gg :YcmCompleter GoToDefinitionElseDeclaration&CR&
nnoremap &leader&gl :YcmCompleter GoToDeclaration&CR&nnoremap &leader&gf :YcmCompleter GoToDefinition&CR&nnoremap &leader&gg :YcmCompleter GoToDefinitionElseDeclaration&CR&
另外,YCM也提供了丰富的配置选项,同样在.vimrc中配置。具体请
let g:ycm_error_symbol = '&&'
let g:ycm_warning_symbol = '&*'
let g:ycm_error_symbol = '&&'let g:ycm_warning_symbol = '&*'
同时,YCM可以打开location-list来显示警告和错误的信息:YcmDiags。个人关于ycm的配置如下:
let g:ycm_error_symbol = '&&'
let g:ycm_warning_symbol = '&*'
nnoremap &leader&gl :YcmCompleter GoToDeclaration&CR&
nnoremap &leader&gf :YcmCompleter GoToDefinition&CR&
nnoremap &leader&gg :YcmCompleter GoToDefinitionElseDeclaration&CR&
nmap &F4& :YcmDiags&CR&
" for ycmlet g:ycm_error_symbol = '&&'let g:ycm_warning_symbol = '&*'nnoremap &leader&gl :YcmCompleter GoToDeclaration&CR&nnoremap &leader&gf :YcmCompleter GoToDefinition&CR&nnoremap &leader&gg :YcmCompleter GoToDefinitionElseDeclaration&CR&nmap &F4& :YcmDiags&CR&
YCM提供的跳跃功能采用了vim的jumplist,往前跳和往后跳的快捷键为Ctrl+O以及Ctrl+I。
YouCompleteMe是我用过的最爽的一个自动补全的插件了。之前使用acp时,遇到大文件基本上就卡死了,以至于都不怎么敢使用。由于YCM使用的时C/S结构,部分使用vim脚本编写,部分认为原生代码,使得跑起来速度飞快。
抛弃Vim自带的坑爹的补全吧,抛弃ctags吧,抛弃cscope吧,YCM才是终极的补全神器。
在安装过程中,我也遇到了不少的坑。一会会发一篇解决这些坑的文章。
最后祝大家码年顺利,一码平川,码到功成。
可能感兴趣的话题
不支持我大Java!!!!
关于伯乐在线博客
在这个信息爆炸的时代,人们已然被大量、快速并且简短的信息所包围。然而,我们相信:过多“快餐”式的阅读只会令人“虚胖”,缺乏实质的内涵。伯乐在线内容团队正试图以我们微薄的力量,把优秀的原创文章和译文分享给读者,为“快餐”添加一些“营养”元素。
新浪微博:
推荐微信号
(加好友请注明来意)
– 好的话题、有启发的回复、值得信赖的圈子
– 分享和发现有价值的内容与观点
– 为IT单身男女服务的征婚传播平台
– 优秀的工具资源导航
– 翻译传播优秀的外文文章
– 国内外的精选文章
– UI,网页,交互和用户体验
– 专注iOS技术分享
– 专注Android技术分享
– JavaScript, HTML5, CSS
– 专注Java技术分享
– 专注Python技术分享
& 2018 伯乐在线无所不能的vim-vim到底能做什么 | Vimer的程序世界
& 无所不能的vim-vim到底能做什么
其实很早就想写这篇文章了,虽然晚上介绍vim的文章很多,本博也已经就vim的使用写了70多篇博文,但是由于历史的原因,还有很多人对vim能做什么存在误解,包括:
vim对中文支持不好
vim适合临时编辑文本,对IDE的支持不好
vim的内嵌脚本语言不够强大,不像emacs的lisp那样无所不能
我不知道提出这些论断的人是因为不了不了解vim的现状,还是是对vim心存偏见。本博在写vim相关文章的时候,一直坚持只谈技术的原则,不会涉及到与其他编辑器尤其是emacs的任何比较,然而最近在看了某些博文之后,觉得为了不让某些已经过时的观点给初学者选择编辑器时造成困扰,写下这篇文章十分必要。
OK,我们正式开始,在文章的末尾,相信大家都会明白上面的几个观点是否正确。
一.普通人的编辑利器
之所以第一点就提到这个,是因为”文字处理”当然是一个编辑器最基本的功能,而能把编辑的体验发挥到极致的也恐怕只有vim而已了。
这一节,也会参考对vim的使用心得,相信用户的感受是最好的证明。
用户再也不用去网上辛苦的下载D版了!
2.提高输入速度
这个相信也没有什么好争论的,纯键盘操作的速度是鼠标无法比拟的,虽然会带来一定的学习成本,但是相信还是值得的。
3.完美支持中文,并支持多种文件编码
很多编辑器会有处理多字节编码的问题,而vim完美解决了这一点。(如果你的vim没解决,请参考)
4.文本笔记管理
这要归功于vim的一款插件:voom,详情可以参考善用佳软的这篇博文–
二.程序员的编辑利器
如果你是一名程序员,那就千万不要错过vim,它真的为程序员提供了太多贴心的功能。
1.支持几乎所有语言类型
不夸张的说,vim真的是将这一点做到了极致,只要是大家知道的语言,大到c++,python,小到bash,sql,vim全部都默认支持了这些语言的语法高亮,自动缩进,等等。一个编辑器搞定所有源码编写,不用为每门语言学习他的编辑器,降低学习成本,何乐而不为?
2.支持各种语言的代码自动补全和智能提示
3.快速查找函数定义功能及显示函数列表功能
vim+tags+taglist即可轻松实现上面的功能,功能上完全可以替代si或者vs.详见:,
4.支持类似textmate的代码片段功能
我目前使用的是,当然提供这种功能的插件可不只这一个,你可以有更多选择~
5.集成编译调试功能,快速定位编译错误
vim提供了quickfix的功能,可以集成gcc,g++,java,c#,python,php等各种语言的错误定位功能,极大提高了代码编译调试时的错误定位。参见:
如果发现vim有bug,那么大可以自己去研究代码修复~
在linux,windows,mac等多平台都有相应的版本,不用担心跨平台开发的问题!
8.支持插件,无限扩展自己想要的功能
vim本身有自己的脚本语言,如果你真的不想再多学一门语言,那也不是什么大事,gvim7.3已经默认编译支持了python,ruby,lua,perl等等脚本语言,用你喜欢的脚本语言开发去吧!(我爱python!),与emacs的lisp相比,vim自身的脚本语言确实有所欠缺,但是python较之lisp也算是旗鼓相当了吧
三.vim骨灰级玩家的超级终端
这是我几个月来一直试图总结的结论,也是vim发展至今我认为颠覆性的一个大特性。
其实在我现在看来,vim更像是一个超级终端,vim已经支持用python,lua,perl,ruby等多种脚本语言进行脚本编写,只要你愿意,你可以用脚本语言实现任何你想要的功能,然后通过vim展示出来。
简单来说,即vim替你实现了一个通用的界面,而你只需要编写你的逻辑代码,而展现到屏幕这一层,就调用vim的接口,由vim来完成就可以了~
这就是我所说的超级终端的定义,如果还是不能理解,那我们就用实例来说明吧!
1.,提供在vim中查看、发布、修改、删除博客的功能
2.,提供在vim查看、发布、修改、删除twitter的功能
3.,用vim打造你的个人wiki~
4.,在vim中看糗事百科(本博编写)
5.,提供日历的功能,并且可以记笔记
6.,用vim来发邮件,参见:
OK,到此为止就结束啦~对照文章开头的那些所谓vim的不足,是否有了新的认识呢?
然而其实vim所能做的远不止这么点,只要你肯去发掘,你会发现vim真的远超乎你的想象!
您可能也喜欢:
前段时间有博友在群里问了一个关于vim排序的问题,因为时间问题一直没帮忙解决,今天时间正好空出来,就帮忙搞了一下。
原文的问题如下:
前段时间在做文件扫描的时候,有一些关于字节、字符数统计的需求,考虑到有同学也可能用的到,所以整理一下记录在这里。
1.统计当前字符之前的所有字节数
前不久糗百改版,所以原有的qiushibaike.vim插件用起来会有一些问题,今天有时间就修改了一下.
下载地址: http://www.vim.org/scripts/script.php?scr...

我要回帖

更多关于 vim 对齐线 的文章

 

随机推荐