Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Productive with Sublime #1

Source code awal

                        $table->string('type');
                        $table->string('name');
                        $table->text('description');
                        $table->text('data_sources');
                        $table->integer('created_by');

Hasil yang diinginkan

'type', 'name', 'description', 'data_sources', 'created_by'

1) Normalin indentasi

Select all (ctrl+a) -> geser ke kiri (shift+tab)

$table->string('type');
$table->string('name');
$table->text('description');
$table->text('data_sources');
$table->integer('created_by');

2) Manfaatin multiple cursors

Select all (ctrl+a) -> aktifkan multi cursors (ctrl+shift+l). Mulai hapus dari akhir baris sampai penutup kurung.

$table->string('type'
$table->string('name'
$table->text('description'
$table->text('data_sources'
$table->integer('created_by'

3) Pindah cursor satu kata

Gunakan (ctrl+←) untuk pindah satu kata ke kiri. Gunakan (ctrl+shift+backspace) untuk menghapus dari cursor sampai awal baris.

'type'
'name'
'description'
'data_sources'
'created_by'

4) Pindah cursor ke akhir baris, modify

Maksimalkan tombol home atau end untuk pindah ke awal/akhir baris dengan cepat. Tambahkan koma, lalu delete.

'type', 'name', 'description', 'data_sources', 'created_by', 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment