Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Binding "tab" key

未关闭
#83 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
c, lua
领域
tooling

调研方向

先从 issue 中所示的 OnChar 事件处理、npp.AddShortcut 和 editor:AddText("text") 用法开始,然后将它们对 Tab 键的行为与 Scintilla 的 SCK_TAB 文档进行比较。完成标准是确定脚本是否能够在不禁用默认缩进的情况下检测 Tab,并记录或提供一种在按下该键后插入文本的可行方法。

由索引模型根据 Issue 内容生成。

描述

I see here https://www.scintilla.org/ScintillaDoc.html#KeyBindings that tab is available as SCK_TAB but it can't be assigned to a shortcut npp.AddShortcut or using this:

function func1(ch)
    if (ch == "	") then
        print("Doesn't work (this message is never shown).");
    end

    print("Typed a regular character like a, b, c, d, e, etc... works.")
end

npp.AddEventHandler("OnChar", func1)

If I assign it manually in Notepad++'s settings then it works but the default action of [tab] becomes disabled (so I can't make indentation then).

Is there a way to detect [tab] so that I could insert text after it's pressed with editor:AddText("text");?

主要语言
C
星标
130
派生
24
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dail8859/LuaScript 的其他 Issue

查看 dail8859/LuaScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。