Macro/投稿/30

http://sakura.qp.land.to/?Macro%2F%C5%EA%B9%C6%2F30


Top > Macro > 投稿 > 30

複数行一括コメントアウト

  • ページ: Macro/投稿
  • 作者: すす?
  • カテゴリー: ppa
  • 投稿日: 2004-11-25 (木) 12:04:28

メッセージ

  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
//PPAマクロ
var
str,str1,str2:String;
begin
    str1 := S_ExpandParameter('$f');
    str2 := S_ExpandParameter('$g');
    if ( (Length(str1) - Length(str2)) > 1) then str:=Copy(str1,Length(str2) + 1,Length(str1) - Length(str2));
    S_MoveHistSet(0);   // 現在位置を移動履歴に登録
    if (str = '.c') or (str = '.cpp') or (str = '.h') then
    begin
        S_ReplaceAll('^.', '//$&', 148);    // 選択範囲の行頭を // に置換する。
    end;
    if (str = '.tex') then
    begin
        S_ReplaceAll('^.', '%$&', 148); // 選択範囲の行頭を // に置換する。
    end;
    S_CancelMode(0);        // 各種モードの取り消し     選択状態を解除する。[Esc]キーと一緒。
    S_SearchClearMark(0);   // 検索マークの切替え
    S_MoveHistPrev(0);  // 移動履歴: 前へ
    S_ReDraw(0);    // 再描画
end;


URL B I U SIZE Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua White

リロード   新規 編集 凍結 差分 添付 複製 名前変更   ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
Last-modified: 2006-07-29 (土) 23:54:10 (6473d)