I would like to remap = only when i've opened a by astyle supported filetype in vim else I don't want any remapping on = because other plugins probably want to do it automatically (by accessing vim = - i hope they work like that - will see soon)

at the moment it simply looks like this:

set equalprg=astyle
  • if my question is confusing or hard to understand I'm really happy if you could just tell me that and I will change the hard to understand parts or try to explain everything more detailed – baxbear May 27 '17 at 15:59

Putting something like this in you r ~/.vimrc should work.

au FileType c,cpp,java setlocal equalprg=astyle

That will set 'equalprg' to astyle for any buffer containing a C, C++ or Java file and the setting will be local to that buffer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.