Ruby 如何简单地去掉代码的注释

chenge · May 10, 2014 · Last by chenge replied at May 10, 2014 · 1812 hits

代码里大段的注释,感觉反而是干扰,想去掉,直接看代码。

google: sed remove ruby comment

sed -e 's/#.*$//' -e '/^$/d' inputFile

#1 楼 @saiga sed -i '' 's/#.*$//g' a.rb

谢谢

编辑器可以收起吧?

#3 楼 @Tony612 我是 sublime,没发现能处理注释。方法是可以收起的。

#4 楼 @chenge 哦,Atom 是有的

#5 楼 @Tony612 Atom 确实可以,方便。谢谢!

You need to Sign in before reply, if you don't have an account, please Sign up first.