0

I am frequent user of JS and my specific snippets are placed at ~/.vim/after/snippets/javascript/_.snippets which work fine. Recently i moved to coffeescript but i am not able to define custom snippets of my own. I have tried

.vim/after/snippets/coffee/_.snippets
.vim/after/snippets/coffee/coffee.snippets

I like to use my own snippets but considering vim-snippets Coffee snippets I find that second case should work which is not.

File extention that i am using is .coffee and the snippet is as shown below

snippet log
  console.log ${0}

Am i doing something wrong ?

georoot
  • 3,557
  • 1
  • 30
  • 59
  • 1
    1. What is the output of `:set syntax?` in a coffeescript buffer? 2. You are supposed to indent your snippet with a `` and only a ``. – romainl Feb 12 '17 at 11:03
  • @romainl the snippets are using only, might have missed here. The output from `:set syntax` is `syntax=` – georoot Feb 12 '17 at 20:52

1 Answers1

0

Okay so i figured out the problem. First install kchmck/vim-coffee-script using vundle that would be

Plugin 'kchmck/vim-coffee-script'

Once done I had to reload filetype using

filetype off
filetype plugin indent on
syntax on

The above issue was found from This SF answer

Once that is done, check the output for set syntax, if that returns coffee then everything is configured and the snippets should start working fine.

Community
  • 1
  • 1
georoot
  • 3,557
  • 1
  • 30
  • 59