首页 > 解决方案 > 为什么安装在linux中的vim-emmet不能在style标签中展开缩写?

问题描述

vim-emmet安装在我的 windows 和 linux(debian) 中,并为它们提供相同的 vim 配置文件。test.hmtl为 windows 和 linux(debian) 创建相同的文件。

cat  test.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        img{
            
        }
    </style>
</head>
<body>
    
</body>
</html>

用 vim 打开 test.html 并在 style 的 img 标签中写入 w10。

img{
    w10
}

整体test.html如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        img{
            w10  
        }
    </style>
</head>
<body>
    
</body>
</html>

然后点击热键展开它,我得到:

img{
    width : 10px;
}

用同样的步骤,

img{
    w10
}

扩展到

img{
    <w10></w10>
}

如果我test.css在我的 linux 中编辑 a,

img{
    w10
}

扩展到

img{
    width : 10px;
}

如何解决?

标签: csslinuxvimemmet

解决方案


推荐阅读