- AuthorPosts
- March 1, 2009 at 1:38 am #7006urlwolfMember
As I posted before, I use R.
I just added one regular expression to get it to work with ctags.
Ideally, I should just add a ctags.cfg file in the plugins directory.
This however doesn’t work: the project plugin, in the symbols window, shows nothing but a regex root and a long list of “f, function” as children.here’s my ctags.cfg:
–langdef=r
–langmap=r:.R
–regex-r=/^[ t]*([a-zA-Z0-9_.]+)[ |t]*:?(<-|=)[ |t]*:?function/1/f, function/ This does generate a nice tags file if called from the command line.
the file looks like this (excerpt):!_TAG_FILE_FORMAT 2 /extended format; –format=1 will not append ;” to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /[email protected]/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.7 // f, function e:josecodingigraph-1.6RCohesiveBlocks.R /^Phi <- function(g, i, j){$/;" r f, function e:josecodingigraph-1.6RCohesiveBlocks.R /^as.undirected2 <- function(g){$/;" r f, function e:josecodingigraph-1.6RCohesiveBlocks.R /^cohesive.blocks <- function(graph, db=NULL,$/;" r f, function e:josecodingigraph-1.6RCohesiveBlocks.R /^find.all.min.cutsets <- function(g, k=NULL){$/;" r f, function e:josecodingigraph-1.6RCohesiveBlocks.R /^find.cohesive.parents <- function(id, blockIds, subBranches){$/;" r
Can you help?
Thanks
March 1, 2009 at 3:40 pm #7007urlwolfMembernever mind, I fixed it.
Still, having all the functions in a single list is not ideal, it’d be better (or at least, optional) to have a list per file.Thanks
March 8, 2009 at 5:19 am #7031shxParticipanturlwolf,
Could you post an example of how you got ctags to work?
March 8, 2009 at 10:55 am #7032urlwolfMemberctags is in the plugins folder.
You need to create a file ctags.cnf in the same folder (and make sure that this is the first ctags that is found in your PATH variable, in case you have other tools that use ctags and bundle it!).I think the project plugin calls ctags all by itself, you don’t have to do anything.
But if you want to do it yourself, open a cmd.exe in your source folder, and just say ctags *.c or *.r or whatever.This will create a ctags file that tells the editor in which line every function (or symbol) is defined. Then the editor should be smart enough to jump around.
Good luck,
March 8, 2009 at 6:55 pm #7033shxParticipanturlwolf,
Thanks for your help. I will give it a try.
March 8, 2009 at 9:21 pm #7034shxParticipantO.K
I did your suggestion and created the ctags.cnf file with the proper information
and ran ctags.exe. It generated what looks like a proper ctags file.How do you get emeditor to recognize that file in the symbol list?
March 8, 2009 at 9:28 pm #7036urlwolfMember1- Activate the project plugin.
2- add your files to a project (left sidebar)
3- open right sidebar, select your project from the dropdown list
4- it’ll take a second or two, but you should get a list of symbols.I’ve switched back to vim for the moment, so I won’t check the forums as much.
Good luck.March 9, 2009 at 6:00 pm #7041shxParticipanturlwolf,
Just wanted to thank you for your help even though I still haven’t gotten emeditor to work .March 10, 2009 at 10:06 pm #7045Yutaka EmuraKeymastershx wrote:
urlwolf,
Just wanted to thank you for your help even though I still haven’t gotten emeditor to work .I am sorry it takes long to responde, but I have not researched as to how to add a new language. EmEditor always uses a temporary symbol list with the temporary file name that EmEditor creates. So even if you carete a symbol list by youself by running ctag.exe, I don’t think EmEditor can recognize your symbol list.
May 5, 2009 at 8:01 pm #7253urlwolfMemberoh, that’s very dissapointing.
I have the feeling I don’t understand how emeditor works them.
Bummer. I use languages that are not supported.May 5, 2009 at 11:42 pm #7254Yutaka EmuraKeymasterurlwolf wrote:
oh, that’s very dissapointing.
I have the feeling I don’t understand how emeditor works them.
Bummer. I use languages that are not supported.I will make sure to support unknown languages in v9. Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.