六一的部落格


关关难过关关过,前路漫漫亦灿灿。




说明

  1. 未分类源码应在Private和Public目录下: 已将STUGameModeBase.cpp移动到Private目录下, STUGameModeBase.h移动到Public目录下
  2. 如此, 头文件STUCoreTypes.h和STUUtils.h也可插入相应链接
  3. 对于 Source/ShootThemUp 目录下的以下三个文件, 使用 .. 区分
    -
    ShootThemUp.Build.cs
    ShootThemUp.cpp
    ShootThemUp.h

修改插入项目源码链接函数

  1. 屏蔽之前的定义

  2. 修改定义

    Category 源码路径
    .. Source/ShootThemUp/
    Source/ShootThemUp/Public/和Source/ShootThemUp/Private/
    非空 Source/ShootThemUp/Public/Category和Source/ShootThemUp/Private/Category
     1(defun my/insert-ue-project-source-path ()
     2  (interactive)
     3  (let ((proj (read-string "Project: (Default - ShootThemUp)"))
     4        (type (read-string "Category: "))
     5        (file (read-string "File: "))
     6        (path)
     7        (attr))
     8    (if (string= "" proj)
     9        (setq proj "ShootThemUp"))
    10    (when (string= ".." type)
    11      (insert (format (concat "[[" "uep:%s][%s:%s]]") file proj file)))
    12    (unless (string= type "..")
    13      (if (string-suffix-p ".h" file)
    14          (setq attr "Public")
    15        (setq attr "Private"))
    16      (when (string= type "")
    17        (setq path (format "%s/%s" attr file))
    18        (insert (format (concat "[[" "uep:%s][%s:%s]]") path proj file))
    19        )
    20      (unless (string= type "")
    21        (setq path (format "%s/%s/%s" attr type file))
    22        (insert (format (concat "[[" "uep:%s][%s:%s/%s]]") path proj type file))
    23        )
    24      )
    25    )
    26  )
    27(global-set-key (kbd "C-c u p") 'my/insert-ue-project-source-path)

虚幻引擎项目源码跳转: 更新源码链接分类



说明

  1. 未分类源码应在Private和Public目录下: 已将STUGameModeBase.cpp移动到Private目录下, STUGameModeBase.h移动到Public目录下
  2. 如此, 头文件STUCoreTypes.h和STUUtils.h也可插入相应链接
  3. 对于 Source/ShootThemUp 目录下的以下三个文件, 使用 .. 区分
    -
    ShootThemUp.Build.cs
    ShootThemUp.cpp
    ShootThemUp.h

修改插入项目源码链接函数

  1. 屏蔽之前的定义

  2. 修改定义

    Category 源码路径
    .. Source/ShootThemUp/
    Source/ShootThemUp/Public/和Source/ShootThemUp/Private/
    非空 Source/ShootThemUp/Public/Category和Source/ShootThemUp/Private/Category
     1(defun my/insert-ue-project-source-path ()
     2  (interactive)
     3  (let ((proj (read-string "Project: (Default - ShootThemUp)"))
     4        (type (read-string "Category: "))
     5        (file (read-string "File: "))
     6        (path)
     7        (attr))
     8    (if (string= "" proj)
     9        (setq proj "ShootThemUp"))
    10    (when (string= ".." type)
    11      (insert (format (concat "[[" "uep:%s][%s:%s]]") file proj file)))
    12    (unless (string= type "..")
    13      (if (string-suffix-p ".h" file)
    14          (setq attr "Public")
    15        (setq attr "Private"))
    16      (when (string= type "")
    17        (setq path (format "%s/%s" attr file))
    18        (insert (format (concat "[[" "uep:%s][%s:%s]]") path proj file))
    19        )
    20      (unless (string= type "")
    21        (setq path (format "%s/%s/%s" attr type file))
    22        (insert (format (concat "[[" "uep:%s][%s:%s/%s]]") path proj type file))
    23        )
    24      )
    25    )
    26  )
    27(global-set-key (kbd "C-c u p") 'my/insert-ue-project-source-path)