Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

emacsでファイル行頭のコメント領域を生成する

emacsで一定領域を一気にコメントアウトするには以下のコマンドを実行します。

M-x comment-region

もとはファイル行頭のコメントなんかで使う関数のようで、基本的に一回だけですね

実際のところ

下記の"app.get('/', function (req, res)"中にカーソルを合わせ実行すると

app.get('/', function (req, res) {
  res.render('index');
});

app.listen(3000, function () {
  console.log('Example app listening on port 3000!');
});



hoge()

すると、以下の様にコメントエリアが入ります。

// app.get('/', function (req, res) {
//   res.render('index');
// });
// 
// app.listen(3000, function () {
//   console.log('Example app listening on port 3000!');
// });



hoge()