新手教程 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