I am a new user of vim (gvim in windows), and have found abbreviations a nice time saver - however they would be even better if i could stop the trailing whitespace at times.
I have some directories that i use a lot, and so i added some abbreviation/path pairs to my _vimrc:
:ab diR1 C:/dirA/dira/dir1/
:ab diR2 C:/dirA/dirb/dir2/
etc ...
Now when i type diR1 <space>
i get C:/dirA/dira/dir1/[]|
where the whitespace is represented by []
and the cursor is the |
character. I would like to get rid of the []
== whitespace.
This is a minor complaint: however you seem to be able to customise everthing else in Vim so i figured i'd ask -- is it possible to avoid the trailing whitespace when one uses abbreviations in vim?
An alternate tool used within Vim is a good answer - my objective is to save re-typing frequently used directory structures, but to have the cursor handy as i would almost always add something to the end, such as myFile.txt
.
The trailing white space (doubtless due to the fact that the space
triggered the abbreviation) which i backspace over before adding myFile.txt
to the end is less annoying than typing the whole thing over and over, but it would be ideal if i could avoid doing so ...