Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

Invalid Code Indent #312

Closed bayiburu closed 8 years ago

bayiburu commented 8 years ago

I have writen a javascript snip as following:

snippet rcc
    var React = require('react')

    var ${1} = React.createClass({

        render: function() {
            return (
                <div />
            );
        }

    });

    module.exports = $1

When I use C-k completes the snip, the code format is unexpected(there addtional indent):

snip

Shougo commented 8 years ago

I cannot reproduce the problem. I use "simple-javascript-indenter". It depends on your javascript indentation plugin behavior. Because, neosnippet uses indentation plugin. If you don't like the behaviour, you can use <Tab> characters instead of spaces.