新手教程 Yggdroot/indentLine


这个是一个什么插件呢? 这是一个显示对其线的插件 ,感觉蛮好用的,习惯让代码整齐的vimer必不可缺哦

但是这个插件有一个问题,这个是文档里面作者原本的话

INTRODUCTION                                    *indentLine-introduction*
This plugin is used for displaying thin vertical lines at each indentation
level for code indented with spaces. For code indented with tabs, I think
there is no need to support it, using :set list lcs=tab:\|\ (here is a space)
can achieve it.

大概意思就是这个插件的对齐线只会出现在用空格缩进的行,如果用tab键不会产生对其线,那怎么办呢?

我找到了一个资料,用于吧tab变成空格

http://blog.csdn.net/jiang1013nan/article/details/6298727

最后给出使用方法(插件的安装方法不再给出)

在.vimrc里面添加如下几句

:set ts=4  (注意,这一句话是吧tabstop设置成4个空格,如果之前你已经吧tab键设置成了4个空格,那么请不要写入这句话)
:set expandtab
:%retab!  

 

最后给出截图


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM