Inserts a newline and text, optionally with indentation (helper function)
193820
def newline_text(self, text, indent = False):
        """"""
        self.newline(indent)
        self.text(text)
1238815
function(n_newlines) {
				if('number' === typeof n_newlines) {
					for(let i=0; i<n_newlines; i++) {
						a_chunks.push('');
					}
				}
				else {
					a_chunks.push('');
				}
			}
686235
def insert_in_next_line(tokens, index, string):
    
    tokenized_string = token_utils.listified_tokenizer(string)
    for i, tok in list(enumerate(tokens[index:])):
        token_type = tok[0]
        if token_type in [tokenize.NL, tokenize.NEWLINE]:
            for count, item in enumerate(tokenized_string):
                tokens.insert(index+count+i+1, item)
            break
1080287
def _fill_text(self, text, width, indent):
        
        parts = text.split('\n\n')
        for i, part in enumerate(parts):
            # Check to see if it's a bulleted list--if so, then fill each line
            if part.startswith('* '):
                subparts = part.split('\n')
                for j, subpart in enumerate(subparts):
                    subparts[j] = super(WrappedTextHelpFormatter, self)._fill_text(
                        subpart, width, indent
                    )
                parts[i] = '\n'.join(subparts)
            else:
                parts[i] = super(WrappedTextHelpFormatter, self)._fill_text(part, width, indent)

        return '\n\n'.join(parts)
751545
def _indent(code, by=1):
    """"""
    return "".join(
        ("    " * by if line else "") + line for line in code.splitlines(True)
    )
1038786
function(line) {
        var newLine;

        // ex: [foo <- 1,2,3]
        // [        opening array
        //   (.*)   $1 array to concat into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // ]        closing array
        var regexArr = /\[(.*)(\<\-)(.*)\]/;

        // ex: {foo <- foo: true, bar: 2}
        // {        opening object
        //   (.*)   $1 obj to merge into
        //   (<-)   $2
        //   (.*)   $3 content to be merged
        // }        closing object
        var regexObj = /\{(.*)(\<\-)(.*)\}/;

        newLine = line.replace(regexArr, function($0, $1, $2, $3) {
            return $1.trim() + '.concat([' + $3 + ']);';
        });

        return newLine.replace(regexObj, function($0, $1, $2, $3) {
            return $1.trim() + '.merge({' + $3 + '});';
        });
    }
668054
function(e) {
    if (this.props.parameters.autoIndent) {
      var state = this.state.state;
      var selection = state.getSelection();

      var indentationLevel = indentationLevelAt(state.getCurrentContent(),
                                                selection.getFocusKey(),
                                                selection.getFocusOffset());

      if (state.getCurrentContent().getBlockForKey(selection.getFocusKey())
               .getText().substr(selection.getFocusOffset())
               .trim().startsWith("}")) {
        indentationLevel--;
      }

      state = EditorState.push(
          state,
          this._insertLineAfter(state.getCurrentContent(),
            selection,
            this._generateIndentation(indentationLevel)),
          "inserted-text"
          );

      this.setState({state: state});

      return "handled";
    } else {
      return "not-handled";
    }
  }
53864
def _fill(self, text = ""):
        ""
        if self._do_indent:
            self._write("\n"+"    "*self._indent + text)
        else:
            self._write(text)
90795
def insert(self, iter, text, length=-1):
        

        Gtk.TextBuffer.insert(self, iter, text, length)
1223146
function indent(level) {
    var val = options.indent
    _indent = ''

    if (_lastch === null)
      _lastch = _to                 // as-is, this is the first file
    else if (_lastch !== _to) {
      _lastch = _to
      // istanbul ignore else
      if (output)
        output.emit('data', _to)    // force eol after insert file
    }

    if (level > 0 && val && !/^0+\D?/.test(val)) {
      // format is 2, 2t, 2s, etc. default is spaces
      var match = /^(\d+)\s*(t?)/.exec(val),
          count = level * (match[1] | 0)
      _indent = Array(count + 1).join(match[2] ? '\t' : ' ')
    }
  }
681392
def _indent(string, count):
    ''''''
    indent = _INDENT * count
    ret = indent + string.replace('\n', '\n' + indent)
    return ret.rstrip()
1747
function indent(string, nchars, prefix) {
    "use strict";
    return string.split('\n').map(function(line) {
        return (prefix || '') + new Array(nchars).join(' ') + line;
    }).join('\n');
}
1276734
function stringifyIndented(value, chr, n) {
  return indent(JSON.stringify(value, null, n), chr, n).slice(chr.length * n)
}
842793
function Insert (str, position) {
    if (!this || this.constructor !== SimpleTextOperation) {
      // => function was called without 'new'
      return new Insert(str, position);
    }
    this.str = str;
    this.position = position;
  }
612918
function indent(string, indent) {
    return string.split('\n').map(function (line) {
        return indent + line;
    }).join('\n');
}
1020426
def indent(block, spaces):
    
    new_block = ''
    for line in block.split('\n'):
        new_block += spaces + line + '\n'
    return new_block
1164785
def insert_line_below(self, copy_margin=True):
        
        if copy_margin:
            insert = '\n' + self.document.leading_whitespace_in_current_line
        else:
            insert = '\n'

        self.cursor_position += self.document.get_end_of_line_position()
        self.insert_text(insert)