Skip to content

Instantly share code, notes, and snippets.

@rizqyhi
Created February 12, 2018 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rizqyhi/c33d55ab7f2d0804bdbfbd148fd3baac to your computer and use it in GitHub Desktop.
Save rizqyhi/c33d55ab7f2d0804bdbfbd148fd3baac to your computer and use it in GitHub Desktop.
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