atom.commands.add('atom-text-editor', 'alt-up:up', () => {
	const editor = atom.workspace.getActiveTextEditor();
	const buffer = editor.getBuffer();
	const cursors = editor.cursors;
	cursors.forEach(cursor => {
		cursor.setBufferPosition([previousBlockRow(buffer, cursor.getBufferRow()), 0]);
		cursor.moveToFirstCharacterOfLine();
	});
});

atom.commands.add('atom-text-editor', 'alt-up:extend-up', () => {
	const editor = atom.workspace.getActiveTextEditor();
	const buffer = editor.getBuffer();
	const cursors = editor.cursors;
	cursors.forEach(cursor => {
		cursor.selection.selectToBufferPosition([beginingOfBlockRow(buffer, cursor.getBufferRow()), 0]);
	});
});

atom.commands.add('atom-text-editor', 'alt-up:down', () => {
	const editor = atom.workspace.getActiveTextEditor();
	const buffer = editor.getBuffer();
	const cursors = editor.cursors;
	cursors.forEach(cursor => {
		cursor.setBufferPosition([nextBlockRow(buffer, cursor.getBufferRow()), 0]);
		cursor.moveToFirstCharacterOfLine();
	});
});

atom.commands.add('atom-text-editor', 'alt-up:extend-down', () => {
	const editor = atom.workspace.getActiveTextEditor();
	const buffer = editor.getBuffer();
	const cursors = editor.cursors;
	cursors.forEach(cursor => {
		cursor.selection.selectToBufferPosition([endOfBlockRow(buffer, cursor.getBufferRow()), 0]);
	});
});

function previousBlockRow(buffer, row) {
	if (row <= 0) {
		return 0;
	}

	for (let i = row - 1; --i; i >= 0) {
		if (buffer.lines[i] === "" && buffer.lines[i + 1] !== "") {
			return i + 1;
		}
	}

	return 0;
}

function nextBlockRow(buffer, row) {
	if (row >= buffer.lines.length - 1) {
		return buffer.lines.length - 1;
	}

	for (let i = row; ++i; i < buffer.lines.length) {
		if (buffer.lines[i] === "") {
			if (buffer.lines[i + 1] === "") {
				continue;
			} else {
				return i + 1;
			}
		}
	}

	return buffer.lines.length - 1;
}

function endOfBlockRow(buffer, row) {
	if (row >= buffer.lines.length - 1) {
		return buffer.lines.length - 1;
	}

	for (let i = row; ++i; i < buffer.lines.length) {
		if (buffer.lines[i] === "") {
			if (buffer.lines[i + 1] === "") {
				continue;
			} else {
				return i;
			}
		}
	}

	return buffer.lines.length - 1;
}

function beginingOfBlockRow(buffer, row) {
	if (row <= 0) {
		return 0;
	}

	for (let i = row - 1; --i; i >= 0) {
		if (buffer.lines[i] === "" && buffer.lines[i + 1] !== "") {
			return i;
		}
	}

	return 0;
}

@@ -596,26 +596,24 @@
 sition(%5B
-beginingOf
+previous
 BlockRow
@@ -2191,215 +2191,4 @@
 ;%0A%7D%0A
-%0Afunction beginingOfBlockRow(buffer, row) %7B%0A%09if (row %3C= 0) %7B%0A%09%09return 0;%0A%09%7D%0A%0A%09for (let i = row - 1; --i; i %3E= 0) %7B%0A%09%09if (buffer.lines%5Bi%5D === %22%22 && buffer.lines%5Bi + 1%5D !== %22%22) %7B%0A%09%09%09return i;%0A%09%09%7D%0A%09%7D%0A%0A%09return 0;%0A%7D%0A

fix extend up issue