Skip to content

Instantly share code, notes, and snippets.

" execute like
" :Unite menu:chef
" or mapp
" nnoremap <F1> :<C-U>Unite menu:chef<CR>
let g:unite_source_menu_menus = {}
let g:unite_source_menu_menus.chef = {}
let g:unite_source_menu_menus.chef.candidates = [
\ "apt_package", "bash", "batch", "breakpoint", "chef_gem", "cookbook_file",
\ "cron", "csh", "deploy", "directory", "dpkg_package", "easy_install_package",
@t9md
t9md / tryit.go
Last active August 29, 2015 14:15
package main
import (
"fmt"
)
type Human struct {
name string
age int
phone string
@t9md
t9md / README.md
Last active August 29, 2015 14:15
on the fly macro

目的は以下のコードおセレクトして、変換結果に置き換えること。

const (
	Running State = iota
	Stopped
	Rebooting
	Terminated
)
@t9md
t9md / README.md
Last active August 29, 2015 14:15
syntax transformer

STDIN => transform => STDOUT

Thats' filter command. Filter command in other word => transformer.

you can write transformer whichever language you want.

Using vim's ! command you can transform selected area by that transformer.
This have great possibility to reduce typing!

@t9md
t9md / Readme.md
Created May 30, 2015 18:03
Dirty hack to emulate visual-block mode using multi cursor feature.

Limitation

  • You only can extend selection area for up/down direction.
  • When escaped from visual-mode, multi-cursor not cleared.
@t9md
t9md / autoSwitchTheme.coffee
Last active August 29, 2015 14:24
Automatically swich theme in Atom whether it is in dev mode or based on project dir name.
# use this in your init.coffee
themeSets =
"vim-mode": ["atom-light-ui", "atom-light-syntax"]
"atom": ["atom-dark-ui", "monokai"]
"_devMode": ["one-dark-ui", "one-dark-syntax"]
"_default": ["atom-dark-ui", "base16-tomorrow-dark-theme"]
path = require 'path'
autoSwitchTheme = ->
@t9md
t9md / keymap.cson
Created July 7, 2015 02:49
keymap in markdown-preview
'.markdown-preview':
'j': 'core:move-down'
'k': 'core:move-up'
@t9md
t9md / file0.coffee
Last active August 29, 2015 14:24
ブラウザと同じキーマップで、Inspect Element ref: http://qiita.com/t9md/items/013db47ea5fe807ec9d2
atom.commands.add 'atom-workspace',
'user:inspect-element': =>
atom.openDevTools()
atom.executeJavaScriptInDevTools('DevToolsAPI.enterInspectElementMode()')
@t9md
t9md / apm_list
Last active August 29, 2015 14:24
Atom
$ apm list
Built-in Atom packages (88)
├── archive-view@0.58.0
├── atom-dark-syntax@0.27.0
├── atom-dark-ui@0.49.0
├── atom-light-syntax@0.28.0
├── atom-light-ui@0.41.0
├── autocomplete-atom-api@0.9.0
├── autocomplete-css@0.8.0
├── autocomplete-html@0.7.2