Open the Lua.love File in Vim

So, today I found out that Vim opens zip files for viewing and modifying an interface very similar to a directory browser.

Is there a way to open .love files accordingly? I tried to set the file type:

vim red-pill.love -c "set filetype=zip"

... but no luck. It opens as a binary file.

+4
source share
1 answer

According to the zip.vim plugins :

Apparently, there are a number of archivers that create zip files that do not use the .zip extension (.jar, .xpi, etc.). To process such files, put the line in the <.vimrc> file:

au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))

So add this to your vimrc:

au BufReadCmd *.love call zip#Browse(expand("<amatch>"))
+7
source

Source: https://habr.com/ru/post/1524190/


All Articles