sponsor Vim development Vim logo Vim Book Ad

numlist.vim : Add and remove id to a list items

 script karma  Rating 5/2, Downloaded by 352    Comments, bugs, improvements  Vim wiki

created by
Tian Huixiong
 
script type
utility
 
description
              Only two commands:  NumberedList  and  NoNumberedList
              Just selected lines and call command.
              Commands will guarantee the items with same indent.
              If they are not so, they will be changed.
              All rest items align with the first one.
              
                        Numbered from 1
               line1       :NumberedList      1. line1
               line2                                       2. line2
               line3                                       3. line3
               line4                                       4. line4
               line5                                       5. line5

                        Numbered from 8
               line1      :NumberedList 8     8.  line1
               line2                                        9.  line2
               line3                                      10. line3
               line4                                       11. line4
               line5                                      12. line5

                        Re numbered
               1. line1     :NumberedList     1. line1
               2. line2                                    2. line2
               5. line3                                    3. line3
               7. line4                                    4. line4
               8. line5                                    5. line5

                       Guarantee the same indent
             1. line1     :NumberedList       1. line1
               2. line2                                    2. line2
               5. line3                                    3. line3
               7. line4                                    4. line4
               8. line5                                    5. line5

                         Remove number
               1. line1     :NoNumberedList   line1
               2. line2                                       line2
               3. line3                                       line3
               4. line4                                       line4
               5. line5                                       line5

                         Remove number
               1  line1     :NoNumberedList   line1
               2  line2                                       line2
               3  line3                                       line3
               4  line4                                       line4
               5  line5                                       line5

                       Guarantee the same indent
             1. line1     :NoNumberedList     line1
               2. line2                                       line2
               3. line3                                       line3
               4. line4                                       line4
               5. line5                                       line5

                       Just the same, no error
               line1     :NoNumberedList      line1
               line2                                          line2
               line3                                          line3
               line4                                          line4
               line5                                          line5

                     Guarantee the same indent
             line1     :NoNumberedList        line1
               line2                                          line2
               line3                                          line3
               line4                                          line4
               line5                                          line5
 
install details
           Put this file in ~/.vim/plugin on *nux              
           Or throw it in $vim/vimfiles/plugin on Windows
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
numlist.vim 1.3 2011-09-22 7.3 Tian Huixiong number align to right
numlist.vim 1.2 2011-09-04 7.0 Tian Huixiong Remove number
numlist.vim 1.1 2011-08-30 7.0 Tian Huixiong Commands will guarantee the items with same indent.
If they are not so, they are changed.
numlist.vim 1.0 2011-08-28 7.0 Tian Huixiong This is unix line endings version
numlist.vim 1.0 2011-08-28 7.0 Tian Huixiong Initial upload
ip used for rating: 54.197.3.233

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo