vi editor auto-completion
Hi guys!
I am using ex-050325.tar.bz2 (traditional vi editor), and complie it from source. I want to accomplish auto-completion in this version of vi editor. (e.g. by typing "gr<space>", the string "group" emerges on the screen.) I did this by adding the following line to my ~/.exrc: ------------ ab gr group ------------ The problem is, I have some hundreds of such abbreviations to add. However, I always get an "ERROR" when the number of lines of .exrc file reach a certain limit. Can anybody help me out? New ways of solution are always welcome! Notice that I also use the command ------------- so /root/mylist_of_abbreviations ------------- in the editor to use /root/my...tions as a source read by vi, and the same problem occurred: there is a limit of number of lines for the sourced file... PS: Please do not recommend another editor, though a newbie, I am quite hard-nose on the traditional vi editor, and there is no reason for changing only because of this little problem. (everything perfectly feed my needs except this one) |
Would you consider "vim" to be "another editor"? It has all the "vi" facilities and much more facilities for "abbr" and mapping.
Alternatively - if you look at the source file "ex_tune.h" you will see Code:
/* Dave |
davemguru, Thank you very much for your insightful reply!
I think I will try the ex_tune.h method as soon as possible. Since I am not familiar with computer program languages (only a user of Linux), I have not consider the problem as far as you do... I will finally post the result for my problem. :-) |
davemguru: hi, I tried out the two ways you propose *, but neither of them work.
A little pity. Maybe I shall try vim instead. (* That is, undefine INCORB by comment out the whole section you posted and compile again, or change the line ------- #define INCORB 4 ------- to ------ #define INCORB 9 ------ and re-compile.) Anyway, thank you for your time and effort. |
Hi, guys.
I finally find a fair solution myself. After searching on the net a huge time, I learned that the traditional vi editor has a limitation on the number of key maps in exrc file. (It is designed to have this limitation!!) http://publib.boulder.ibm.com/infoce...ixcmds6/vi.htm I now switch to the editor nvi (new vi), it is great! http://en.wikipedia.org/wiki/Nvi https://sites.google.com/a/bostic.com/keithbostic/nvi It retains the heritages of the traditional vi (elegance, simplicity, ...) and removes the limitations of the traditional vi. So now I can have hundreds of abbreviations defined in exrc. I must say that, nvi perhaps is the simplest editor which possesses all the powerful functions of triditional vi, yet free of the many limitations of it. |
All times are GMT -5. The time now is 02:57 AM. |