Skip to content

Instantly share code, notes, and snippets.

View cohalz's full-sized avatar
🌴
On vacation

cohalz cohalz

🌴
On vacation
View GitHub Profile
set nocompatible
set hidden
filetype off
set autoread
set noswapfile
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle'))
endif
set nocompatible
set hidden
filetype off
set autoread
set noswapfile
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle'))
endif
import System.Environment
import Data.List
import System.Directory
import System.IO
import Control.Exception
dispatch :: String -> [String] -> IO ()
dispatch "add" = add
dispatch "view" = view
dispatch "remove" = remove
//Vimなどに使えるScala系のdictファイルを生成することができます
//先にdefのある行をgrepしてお使いください
//例:
//grep -h def -r ~/scalaz-scalaz-seven > scalaz.txt
//scala scalaToDict.scala scalaz.txt > scalaz.dict
import scala.io.Source
val regSym = """def\s([^0-9a-zA-Z_]+?)[\s\(\[]+""".r
val regAlf = """def\s(.+?)[^0-9a-zA-Z_]""".r
if(args.length > 0) {
val lines = Source.fromFile(args(0)).getLines().toList
!
!!
!&&
!?
!||
#
##::
#::
%
%%=
!
!!
!!<
!<
!=
#
###
#&&
#::
#:::
@cohalz
cohalz / gvimrc
Last active August 29, 2015 13:57
let $SSH_ASKPASS = simplify($VIM . '/../../MacOS') . '/macvim-askpass'
set noimdisable
set imdisableactivate
if has('gui_macvim')
set guioptions-=T
set showtabline=0
set imdisable " IME OFF
set guioptions-=T " ツールバー非表示
@cohalz
cohalz / vimrc
Last active August 29, 2015 13:57
set nocompatible
set hidden
filetype off
set autoread
set noswapfile
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle'))
endif
//grepでdefのある行を抽出したファイルからvim用のdict向けに結果を出力
//例:grep -r -h def */scalaz-scalaz-seven > scalaz.txt
// scalaToDict.scala scalaz.txt > scalaz.dict
import scala.io.Source
val reg = """def\s(.+?)[\s\[\(]""".r
if(args.length > 0) {
val lines = Source.fromFile(args(0)).getLines().toList
val defdict = for(line <- lines;m <- reg.findFirstMatchIn(line)) yield m.group(1)
val defdictsorted = defdict.sorted.distinct
defdictsorted.foreach(println)
import System.Environment
import Data.List
import System.Directory
import System.IO
import Control.Exception
dispatch :: String -> [String] -> IO ()
dispatch "add" = add
dispatch "view" = view
dispatch "remove" = remove