added check for gui. Some settings causes bugs in vim but are okay in gvim