let TOOLSDIR=$HOME . "/vimfiles/tools"because HOME is setted in gVimPortable/App/AppInfo/Launcher/gVimPortable.ini:
[Environment] VIM=%PAL:AppDir%\vim VIMRUNTIME=%PAL:AppDir%\vim\vim74 HOME=%PAL:DataDir%\settings LANG=%PAL:LanguageCustom%Also you can add there any other environment variables to use them in vim config file.
I usually create there - in settings/ - "tools" directory and make there "ctags", "astyle" and other folders with my external tools binaries, config files, etc...
Now you can make something like:
" Beautifiers. exec ':cabbr astyle ' . TOOLSDIR . '/astyle/astyle.exe --options=' . TOOLSDIR . '/astyle/.astylerc' exec ':cabbr uncr ' . TOOLSDIR . '/uncrustify/uncrustify.exe -q -c ' . TOOLSDIR . '/uncrustify/uncrustify.cfg'for your beautifiers. Select code fragment (or all text in file) and type :!astyle for example, to see how it works.
Комментариев нет:
Отправить комментарий
Thanks for your posting!