-2

To input w100p and ctrl+y+, or w100p and tab,w100p can't expand into width: 100%.
No snippets.json file found with command find / -name 'snippets.json',is it the reason?
snippets.json can download from url.
snippets.json

Where to put snippets.json in my vim installed directory?

tree  -L 1  /usr/share/vim/vim74
/usr/share/vim/vim74
├── autoload
├── bugreport.vim
├── bundle
├── colors
├── compiler
├── debian.vim
├── delmenu.vim
├── doc
├── evim.vim
├── filetype.vim
├── ftoff.vim
├── ftplugin
├── ftplugin.vim
├── ftplugof.vim
├── gvimrc_example.vim
├── indent
├── indent.vim
├── indoff.vim
├── keymap
├── lang
├── macros
├── menu.vim
├── mswin.vim
├── optwin.vim
├── plugin
├── print
├── rgb.txt
├── scripts.vim
├── spell
├── synmenu.vim
├── syntax
├── tutor
└── vimrc_example.vim

In the mannual , Create snippets.json file in extensions folder to add or override snippets.

2
  • 3
    Read emmet-vim README - github.com/mattn/emmet-vim#adding-custom-snippets
    – grodzik
    Commented Mar 14, 2017 at 10:22
  • 3
    This seems trivially answered by reading the official readme for emmet-vim (something which should have been part of the basic research before asking this question), and grodzik even linked to the specific part. Given that you've opened a bounty several days after grodzik's comment, you seem to think that the readme is insufficient. Could you edit your question to explain why it's insufficient?
    – 8bittree
    Commented Mar 22, 2017 at 18:55

2 Answers 2

0
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim  

copy https://github.com/emmetio/emmet/blob/master/lib/snippets.json into ~./vim/snippets.json

vim .vimrc
let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.vim/snippets.json')), "\n"))
0

i've just stuck into the same problem while trying to add emmet abbreviations in vue.js single-file components, inside style section with stylus lang enabled.

So i checked out this docs:

:help emmet-css-expression-syntax

and found out, that we should use | symbol after abbreviation for our cursor position, and there are plenty other tricks. Just check it out.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.