stevearc / vim-arduino

Vim plugin for compiling and uploading arduino sketches
MIT License
344 stars 24 forks source link

Not working with vim under Ubuntu 18.04 #33

Closed Eric97 closed 4 years ago

Eric97 commented 4 years ago

After installing the plugin with plug, all the arduino commands cannot be invoked either in Vim or NeoVim. The default arduino_cmd is installed at /usr/local/bin/arduino.

stevearc commented 4 years ago

When you say "cannot be invoked", what is actually happening? And please post the output of :ArduinoInfo if you can.

Eric97 commented 4 years ago

:ArduinoInfo and the other :Ardu* commands are not recognized as valid editor commands. :help arduino can display the help document though.

stevearc commented 4 years ago

Ah, the commands are defined in the ftplugin file https://github.com/stevearc/vim-arduino/blob/master/ftplugin/arduino.vim

It's possible that the files you're editing aren't properly recognized. The ftdetect rules live here: https://github.com/stevearc/vim-arduino/blob/master/ftdetect/arduino.vim

Try doing a :se ft? to check the detected filetype. If it's not set to arduino then that would explain it, and then we can figure out why the detection isn't working.

Eric97 commented 4 years ago

Thanks. After opening the .ino file in vim, then the commands can work with the correct file type detected!