counsel-etags icon indicating copy to clipboard operation
counsel-etags copied to clipboard

如何指定tag的输出路径

Open nesteiner opened this issue 3 years ago • 4 comments

这里我调用 counsel-etags-scan-mode 生成 TAGS ,默认生成在当前目录下,该怎么更改输出路径?

nesteiner avatar Jun 27 '21 08:06 nesteiner

counsel-etags-scan-code create TAGS file in directory you selected. Once TAGS file is created, counsel-etags will update it automatically.

redguardtoo avatar Jun 27 '21 12:06 redguardtoo

我再多问问,如何tag的文件名改为 .tags

nesteiner avatar Oct 29 '21 16:10 nesteiner

我这里配置了还是生成 TAGS 文件

(use-package counsel-etags
  :ensure t
  :bind (:map prog-mode-map
	      ("C-c ]" . counsel-etags-find-tag-at-point)
	      ("C-c [" . counsel-etags-find-tag)
	      ("C-c s" . counsel-etags-scan-code)
	      ("C-c b" . pop-tag-mark))
  :init (add-hook 'prog-mode-hook
		  (lambda ()
		    (add-hook 'after-save-hook 'counsel-etags-virtual-update-tags 'append 'local)))
  :config
  (setq counsel-etags-update-interval 60
	counsel-etags-tags-file-name ".tags")
  (push "build" counsel-etags-ignore-directories))

nesteiner avatar Oct 29 '21 16:10 nesteiner

counsel-etag只负责读数据。实际生成tags文件的都是后端的命令行程序,可能是ctags,也可能是ctags的某个变种。看一下ctags的文档。

redguardtoo avatar Oct 29 '21 23:10 redguardtoo