Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #7006

    urlwolf
    Member

    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 /dhiebert@users.sourceforge.net/ !_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

    #7007

    urlwolf
    Member

    never 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

    #7031

    shx
    Participant

    urlwolf,

    Could you post an example of how you got ctags to work?

    #7032

    urlwolf
    Member

    ctags 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,

    #7033

    shx
    Participant

    urlwolf,

    Thanks for your help. I will give it a try.

    #7034

    shx
    Participant

    O.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?

    #7036

    urlwolf
    Member

    1- 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.

    #7041

    shx
    Participant

    urlwolf,
    Just wanted to thank you for your help even though I still haven’t gotten emeditor to work .

    #7045

    Yutaka Emura
    Keymaster

    shx 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.

    #7253

    urlwolf
    Member

    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.

    #7254

    Yutaka Emura
    Keymaster

    urlwolf 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!

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone