Reputation: 1166
I want to use Vim as the editor for my Erlang coding. I managed to install the plugin for Erlang in vim, and I want to know if it is possible to compile the current buffer inside vim? In Emacs for example you can start Erlang shell using Ctrl C + Ctrl L key combination. So is there a alternative in Vim to start the Erlang shell and then compile the current buffer?
Upvotes: 4
Views: 1204
Reputation: 4878
I also use the same vimerl plugin for erlang development in vim. However, I had to make a small change to it to make some improvements to the way it compiles for checking.
Once I'd made these changes, writing the file (e.g. with :w
) caused vimerl to compile that source file and put the warnings/errors in the quickfix list (exactly the same way that :make
would do if you had a Makefile in place).
FWIW, I also have the following configuration in my vimrc:
let g:erlangHighlightErrors = 1
let g:erlangHighlightBif = 1
let g:erlangCompletionDisplayDoc = 1
let g:erlangWranglerPath = "/usr/local/share/wrangler"
let g:erlangRefactoring = 1
Upvotes: 0
Reputation: 5083
For a quick shell command from inside Vim, use :!command -a -b arg1
(e.g. :!ls -l
, :!erl %
).
But Emacs is not Vim, they have different ideas behind both. Vim is just a text editor with programming extensions, it's not a place for terminal inside (just as for tetris and M-x doctor
).
Vim maintainers refuse to add a full-blown terminal implementation into Vim itself (for more details, see :help shell-window
).
If you still want an in-buffer shell, you can take a look at ConqueTerm , but it does not work seamlessly. I tried it, but prefer using tmux
/ screen
to split my console's screen estate into windows.
Upvotes: 5