Quick Vim Macro for Sass @import
Since Sass @import doesn’t support globbing (without this gem), here’s a quick Vim macro for importing the contents of a directory.
:r !ls modules/— “read” output of command into the bufferqq— record macro- Insert
@import modules/before filename ysiW"— surround WORD with ” (using vim-surround)q— stop recordingV7j- enter linewise visual and select 7 lines down:norm @q— execute macro on selected lines