Sunday, March 02, 2014

I've been watching coding casts last two days, I really like Jeffrey Way's casts, he always has some nice tricks. he has a new site Laracasts, and I heard about it from PHP Town Hall Podcast. these are what I've watched these two days:

some tricks I learned (windows shortcut keys)

  • sublime: Ctrl-D to select word under cursor, Ctrl-D again to find next and create a new cursor
  • sublime: Ctrl-P (find file), type keyword and then follow by @ to switch to specific function instantly
  • sublime: Ctrl-Shift-P, type "snippet" to list available snippets of current file type
  • copy text from console using pbcopy

here's a pbcopy for cygwin after googling:

if [ -e /dev/clipboard ]; then
    alias pbcopy='cat >/dev/clipboard'
    alias pbpaste='cat /dev/clipboard'

(updated: cygwin has build-in functions on windows, install the cygutils-extra package, putclip and getclip commands)

Friday, March 28, 2014

I'm totally dive into golang, it will be my primary language from now on.

see how clean it is:

type ByteSize float64
const (
    _ = iota  // ignore first value by assigning to blank identifier
    KB ByteSize = 1<<(10*iota)

for editor, desktop environment I use LiteIDE (updated, it was removed by my antivirus program), and waiting for the netbeans plugins.

under terminal go already provided an vim plugin (in misc/vim/), add these lines to .vimrc

filetype off
filetype plugin indent off
set runtimepath+=$GOROOT/misc/vim
filetype plugin indent on
syntax on
autocmd BufWritePre *.go :silent Fmt
au FileType go map <leader>r :!go run %<CR>

Blog Archives

Search Blog: