Преглед изворни кода

improved vim foldtext by removing code. Now just indent/line count.

cinaeco пре 15 година
родитељ
комит
f228efc077
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      vim/vimrc

+ 3 - 1
vim/vimrc

@@ -53,12 +53,14 @@ set foldtext=MyFoldText()
 
 function! MyFoldText()
     let line = getline(v:foldstart)
+    let indent = indent(v:foldstart)
+    let indentOnly = strpart(line, 0, indent-1)
     let linecount = v:foldend+1 - v:foldstart
     let plural = ""
     if linecount != 1
         let plural = "s"
     endif
-    let foldtext = '+'.line.'... ('.linecount.' More lines)'
+    let foldtext = '+'.indentOnly.'... ('.linecount.' More lines)'
     return foldtext
 endfunction