Giter VIP home page Giter VIP logo

ya_hidemaru_snippet's Issues

ディレクトリ階層の変更

ディレクトリ階層を以下のように変更する。
ユーザーにキーアサインして欲しいマクロは「秀丸マクロディレクトリ」以下へ配置し、ya_hidemaru_snippetディレクトリ以下に内部利用のマクロ、スニペットファイルを配置する。

├─ya_config_menu.mac
├─ya_hidemaru_snippet.mac
└─ya_hidemaru_snippet
    ├─doc
    ├─internal
    └─snippet
        └─text-mode
            ├─c-mode
            │  └─cpp-mode
            └─fx-mode

異なるモード間でのスニペットファイルの共有

C#のスニペットである cs-mode から c-mode の for.txt を参照したい。
現状で同じファイルのコピーを保持するしかない、保守に手間がかかるので何とかしたい。

スニペットファイルの構文を拡張して(例えばinclude命令)、外部ファイルを取り込めるようにするといった案が考えられる。

任意の位置でスニペット展開できるように

(問題)
現状の入力方法
Command Arg1 Arg2...

こういう場面で使えない
foo := Command Arg1 Arg2...

fooをコマンドとして認識するのでスニペットが誤発するか動作しない。

(課題)
コマンドより前に文字がある場合でも、スニペットが正常に発動するように。

(案1)
メニューからコマンドを選ぶと ダイアログが起動するようにして、そのダイアログで引数を入力する。
→ダイアログ中では単語補完と秀丸エディタのマクロが効かない。(引数も効率よく作りたい)

(案2)
カール位置付近からコマンド文字列を見つけてくる。
引数にコマンドと同じ文字列が含まれていると誤発動する恐れあり。
class name class arg2

スニペットの冒頭へコメントを記述できるようにする

(問題点)
コメントの記述方法はスニペットを処理する言語依存する。

(追加でやりたいこと)
コメントだけでなくヘルプも埋め込みたい。

(例)TXTの場合。(yasnippetまんま)

contributor : [email protected]

name : foo

--

スニペット本体はこの行から始まる。

-- この行はスニペットとして扱われる。

スニペットディレクトリの整理

snippetsディレクトリ直下にある下記ファイルを internalディレクトリ へ移動する、

  • (*.mac)
  • config.ini

スニペットのディレクトリにあるのは間違い。

ファイル名として使えない文字をコマンドで使えるようにする

このようなコマンドを実装したいが、*:/?はファイル名として使えない。
【展開前】

  • x y
    【展開後】
    x=x*y;

(案1)
全角文字(*:/¥)でファイル名を付ける。
*.%.%.txt

コマンド中の「半角*」はファイル名を検索するときには「全角*」として扱うと何とかなりそう。

コマンドを除いた文字列をスニペットへ渡す

コマンドを除いた文字列をスニペットへ渡せるようにする、markdownのスニペットで必要となった。

下記例では、"引数1 引数2" がスニペットへ渡される。
コマンド 引数1 引数2

対応が必要なマクロ。
ya_hidemaru_snippet_bat.mac
ya_hidemaru_snippet_js.mac
ya_hidemaru_snippet_mac.mac
ya_hidemaru_snippet_py.mac
ya_hidemaru_snippet_txt.mac
ya_hidemaru_snippet_vbs.mac

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.