Loading ...
Sorry, an error occurred while loading the content.

Re: [pcgen] Re: vi syntax file for lst?

Expand Messages
  • Martijn Verburg
    And welcome back Mr Monk, has been awhile :-) ... [Non-text portions of this message have been removed]
    Message 1 of 13 , Jan 4, 2012
    • 0 Attachment
      And welcome back Mr Monk, has been awhile :-)

      On 4 January 2012 19:02, resident <merton_monk@...> wrote:

      > **
      >
      >
      > Wow... I still use vi when I'm on a unix system. I never liked emacs.
      > Since the lst files are tab delimited, using an editor that handles that
      > kind of white-space delimiter is handy. Excel does a lot of the work for
      > you in that regard. :)
      > It's always been a desire to get the built-in editors to the point where
      > external file editors aren't necessary.
      >
      > -Bryan
      > p.s. Happy New Year everyone!
      >
      > --- In pcgen@yahoogroups.com, "RoninKelt" <deltadave@...> wrote:
      > >
      > >
      > >
      > > --- In pcgen@yahoogroups.com, "Barak" <barak@> wrote:
      > > >
      > > > > -----Original Message-----
      > > > > Has anyone coded up a syntax file for vi to use when coding lst or
      > pcc
      > > > files? If
      > > > > so would you be willing to share it?
      > > >
      > > > If we have any, they're here:
      > > >
      > > > http://wiki.pcgen.org/Text_Editors
      > > >
      > > > Barak
      > > >
      > >
      > >
      > > This was greatly helpful - I'm going to adapt one of these to vi. Will
      > share back as soon as I can get it working to my satisfaction.
      > >
      > > Dave
      > >
      >
      >
      >


      [Non-text portions of this message have been removed]
    • FerretDave
      Greetings, I use vim (VI iMproved) and use that on windows & unix (touch typist - I use the keyboard as much as possible). ... syntax on filetype on au
      Message 2 of 13 , Jan 5, 2012
      • 0 Attachment
        Greetings,

        I use 'vim' (VI iMproved) and use that on windows & unix (touch typist - I use the keyboard as much as possible).

        in the _vimrc file (in the c:\program files\vim\ directory) I've added:
        -----------------------------------------------
        syntax on
        filetype on
        au BufNewFile,BufRead *.lst,*.pcc set ft=pcge

        " henk@... developed these mappings to map horizontal alignment to vertical alignment
        "(F2) and back (F3) in vim.
        " Press F2 when opening a file, press F3 before saving the file.
        " Do not press F2 more than once. Add comments, but always use two newlines,
        "> two before the comment line, two after.

        nmap <F2> :%!perl -p -e "s/\n/\n\n/g ; s/\t+/\n\t/g;"<CR>
        nmap <F3> :%!perl -e "undef $/; my $lst = <>; $lst =~ s/\n(?\!\n)//gsm; $lst =~ s/\n\n/\n/g; print $lst"<CR>

        "This works, but loses the number of tabs between the lines. This is not a
        "problem of you run prettylst.pl in between commits. This ensures a terse
        "diff, but would add a large diff if commits are made that do not use
        "prettylst.

        -----------------------------------------------
        Thanks to Henk for that one.
        There is a pcgen.vim file (seems to have disappeared from the files, so I've just uploaded here: http://games.groups.yahoo.com/group/pcgen/files/Homebrew/ )

        goes into C:\Program Files\Vim\vimfiles\syntax

        Can someone add the above onto the wiki setup notes for vim please?
        http://wiki.pcgen.org/Vim_Setup


        Cheers
        Dave
        --- In pcgen@yahoogroups.com, Martijn Verburg <martijnverburg@...> wrote:
        >
        > And welcome back Mr Monk, has been awhile :-)
        >
        > On 4 January 2012 19:02, resident <merton_monk@...> wrote:
        >
        > > **
        > >
        > >
        > > Wow... I still use vi when I'm on a unix system. I never liked emacs.
        > > Since the lst files are tab delimited, using an editor that handles that
        > > kind of white-space delimiter is handy. Excel does a lot of the work for
        > > you in that regard. :)
        > > It's always been a desire to get the built-in editors to the point where
        > > external file editors aren't necessary.
        > >
        > > -Bryan
        > > p.s. Happy New Year everyone!
        > >
        > > --- In pcgen@yahoogroups.com, "RoninKelt" <deltadave@> wrote:
        > > >
        > > >
        > > >
        > > > --- In pcgen@yahoogroups.com, "Barak" <barak@> wrote:
        > > > >
        > > > > > -----Original Message-----
        > > > > > Has anyone coded up a syntax file for vi to use when coding lst or
        > > pcc
        > > > > files? If
        > > > > > so would you be willing to share it?
        > > > >
        > > > > If we have any, they're here:
        > > > >
        > > > > http://wiki.pcgen.org/Text_Editors
        > > > >
        > > > > Barak
        > > > >
        > > >
        > > >
        > > > This was greatly helpful - I'm going to adapt one of these to vi. Will
        > > share back as soon as I can get it working to my satisfaction.
        > > >
        > > > Dave
        > > >
        > >
        > >
        > >
        >
        >
        > [Non-text portions of this message have been removed]
        >
      • FerretDave
        ok, that pcgen.vim syntax file is partially broken, works on some files, but gives errors on others (an abilities_mod.lst file failed, but several others
        Message 3 of 13 , Jan 5, 2012
        • 0 Attachment
          ok, that pcgen.vim syntax file is partially broken, works on some files, but gives errors on others (an abilities_mod.lst file failed, but several others worked ok)
          Its a starting point at least.

          And you can quit past the errors and still edit the file ok.

          --- In pcgen@yahoogroups.com, "FerretDave" <ferret.griffin@...> wrote:
          >
          > Greetings,
          >
          > I use 'vim' (VI iMproved) and use that on windows & unix (touch typist - I use the keyboard as much as possible).
          >
          > in the _vimrc file (in the c:\program files\vim\ directory) I've added:
          > -----------------------------------------------
          > syntax on
          > filetype on
          > au BufNewFile,BufRead *.lst,*.pcc set ft=pcge
          >
          > " henk@... developed these mappings to map horizontal alignment to vertical alignment
          > "(F2) and back (F3) in vim.
          > " Press F2 when opening a file, press F3 before saving the file.
          > " Do not press F2 more than once. Add comments, but always use two newlines,
          > "> two before the comment line, two after.
          >
          > nmap <F2> :%!perl -p -e "s/\n/\n\n/g ; s/\t+/\n\t/g;"<CR>
          > nmap <F3> :%!perl -e "undef $/; my $lst = <>; $lst =~ s/\n(?\!\n)//gsm; $lst =~ s/\n\n/\n/g; print $lst"<CR>
          >
          > "This works, but loses the number of tabs between the lines. This is not a
          > "problem of you run prettylst.pl in between commits. This ensures a terse
          > "diff, but would add a large diff if commits are made that do not use
          > "prettylst.
          >
          > -----------------------------------------------
          > Thanks to Henk for that one.
          > There is a pcgen.vim file (seems to have disappeared from the files, so I've just uploaded here: http://games.groups.yahoo.com/group/pcgen/files/Homebrew/ )
          >
          > goes into C:\Program Files\Vim\vimfiles\syntax
          >
          > Can someone add the above onto the wiki setup notes for vim please?
          > http://wiki.pcgen.org/Vim_Setup
          >
          >
          > Cheers
          > Dave
          > --- In pcgen@yahoogroups.com, Martijn Verburg <martijnverburg@> wrote:
          > >
          > > And welcome back Mr Monk, has been awhile :-)
          > >
          > > On 4 January 2012 19:02, resident <merton_monk@> wrote:
          > >
          > > > **
          > > >
          > > >
          > > > Wow... I still use vi when I'm on a unix system. I never liked emacs.
          > > > Since the lst files are tab delimited, using an editor that handles that
          > > > kind of white-space delimiter is handy. Excel does a lot of the work for
          > > > you in that regard. :)
          > > > It's always been a desire to get the built-in editors to the point where
          > > > external file editors aren't necessary.
          > > >
          > > > -Bryan
          > > > p.s. Happy New Year everyone!
          > > >
          > > > --- In pcgen@yahoogroups.com, "RoninKelt" <deltadave@> wrote:
          > > > >
          > > > >
          > > > >
          > > > > --- In pcgen@yahoogroups.com, "Barak" <barak@> wrote:
          > > > > >
          > > > > > > -----Original Message-----
          > > > > > > Has anyone coded up a syntax file for vi to use when coding lst or
          > > > pcc
          > > > > > files? If
          > > > > > > so would you be willing to share it?
          > > > > >
          > > > > > If we have any, they're here:
          > > > > >
          > > > > > http://wiki.pcgen.org/Text_Editors
          > > > > >
          > > > > > Barak
          > > > > >
          > > > >
          > > > >
          > > > > This was greatly helpful - I'm going to adapt one of these to vi. Will
          > > > share back as soon as I can get it working to my satisfaction.
          > > > >
          > > > > Dave
          > > > >
          > > >
          > > >
          > > >
          > >
          > >
          > > [Non-text portions of this message have been removed]
          > >
          >
        • resident
          Thanks Karianna. :) I m gratified that you all have continued to do such good work with PCGen! My current campaign is Pathfinder, so PCGen s foray into that
          Message 4 of 13 , Jan 5, 2012
          • 0 Attachment
            Thanks Karianna. :)

            I'm gratified that you all have continued to do such good work with PCGen! My current campaign is Pathfinder, so PCGen's foray into that has been helpful.

            -Bryan

            --- In pcgen@yahoogroups.com, Martijn Verburg <martijnverburg@...> wrote:
            >
            > And welcome back Mr Monk, has been awhile :-)
            >
            > On 4 January 2012 19:02, resident <merton_monk@...> wrote:
            >
            > > **
            > >
            > >
            > > Wow... I still use vi when I'm on a unix system. I never liked emacs.
            > > Since the lst files are tab delimited, using an editor that handles that
            > > kind of white-space delimiter is handy. Excel does a lot of the work for
            > > you in that regard. :)
            > > It's always been a desire to get the built-in editors to the point where
            > > external file editors aren't necessary.
            > >
            > > -Bryan
            > > p.s. Happy New Year everyone!
            > >
            > > --- In pcgen@yahoogroups.com, "RoninKelt" <deltadave@> wrote:
            > > >
            > > >
            > > >
            > > > --- In pcgen@yahoogroups.com, "Barak" <barak@> wrote:
            > > > >
            > > > > > -----Original Message-----
            > > > > > Has anyone coded up a syntax file for vi to use when coding lst or
            > > pcc
            > > > > files? If
            > > > > > so would you be willing to share it?
            > > > >
            > > > > If we have any, they're here:
            > > > >
            > > > > http://wiki.pcgen.org/Text_Editors
            > > > >
            > > > > Barak
            > > > >
            > > >
            > > >
            > > > This was greatly helpful - I'm going to adapt one of these to vi. Will
            > > share back as soon as I can get it working to my satisfaction.
            > > >
            > > > Dave
            > > >
            > >
            > >
            > >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          • Henk Slaaf
            ... Ha! Nice to see that someone else is using it :) The file is in SVN here: https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/ Best, Henk
            Message 5 of 13 , Jan 6, 2012
            • 0 Attachment
              >
              > Thanks to Henk for that one.
              > There is a pcgen.vim file (seems to have disappeared from the files, so
              > I've just uploaded here:
              > http://games.groups.yahoo.com/group/pcgen/files/Homebrew/ )
              >
              Ha!

              Nice to see that someone else is using it :)

              The file is in SVN here:
              https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/

              Best,

              Henk


              [Non-text portions of this message have been removed]
            • FerretDave
              It s most handy, and much appreciated!
              Message 6 of 13 , Jan 6, 2012
              • 0 Attachment
                It's most handy, and much appreciated!

                --- In pcgen@yahoogroups.com, Henk Slaaf <henk@...> wrote:
                >
                > >
                > > Thanks to Henk for that one.
                > > There is a pcgen.vim file (seems to have disappeared from the files, so
                > > I've just uploaded here:
                > > http://games.groups.yahoo.com/group/pcgen/files/Homebrew/ )
                > >
                > Ha!
                >
                > Nice to see that someone else is using it :)
                >
                > The file is in SVN here:
                > https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/
                >
                > Best,
                >
                > Henk
                >
                >
                > [Non-text portions of this message have been removed]
                >
              • RoninKelt
                Both of the ones in svn are totally different than the one on the files section here. These are all 3 useful, I m going to use them to make a ftplugin and a
                Message 7 of 13 , Jan 6, 2012
                • 0 Attachment
                  Both of the ones in svn are totally different than the one on the files section here. These are all 3 useful, I'm going to use them to make a ftplugin and a syntax file with lots of handy tools. Still working on this in my spare time so bear with me, please.

                  Dave
                • Henk Slaaf
                  ... Hey Dave! Which two are in SVN? I know of only the one I linked to (and wrote/pieced together). Best, Henk [Non-text portions of this message have been
                  Message 8 of 13 , Jan 7, 2012
                  • 0 Attachment
                    On Sat, Jan 7, 2012 at 07:40, RoninKelt <deltadave@...> wrote:

                    > **
                    >
                    >
                    > Both of the ones in svn are totally different than the one on the files
                    > section here. These are all 3 useful, I'm going to use them to make a
                    > ftplugin and a syntax file with lots of handy tools. Still working on this
                    > in my spare time so bear with me, please.
                    >

                    Hey Dave!

                    Which two are in SVN? I know of only the one I linked to (and wrote/pieced
                    together).

                    Best,

                    Henk


                    [Non-text portions of this message have been removed]
                  • RoninKelt
                    In SVN is a ftplugin at https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/vimrc/ftplugin/ - this only contains a couple of lines that point to a
                    Message 9 of 13 , Jan 9, 2012
                    • 0 Attachment
                      In SVN is a ftplugin at https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/vimrc/ftplugin/ - this only contains a couple of lines that point to a perl utility

                      also in svn is a syntax file - https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/utilities/editor%20syntax/vim/ - this file has some good stuff in it such as a couple of regex that I hadn't quite worked out yet.

                      The final file is http://games.groups.yahoo.com/group/pcgen/files/Homebrew/pcgen.vim - from this file I'm extracting some functions and taking a look at how it works. It is apparently pretty old and doesn't work well with the latest iteration of lst syntax.

                      Work progresses on my syntax file and the plan is to integrate the parts I like from each of these files, but things are moving slowly as I'm working 70+ hours a week until I deliver my current project at the end of February.


                      Dave
                      --- In pcgen@yahoogroups.com, Henk Slaaf <henk@...> wrote:
                      >
                      > On Sat, Jan 7, 2012 at 07:40, RoninKelt <deltadave@...> wrote:
                      >
                      > > **
                      > >
                      > >
                      > > Both of the ones in svn are totally different than the one on the files
                      > > section here. These are all 3 useful, I'm going to use them to make a
                      > > ftplugin and a syntax file with lots of handy tools. Still working on this
                      > > in my spare time so bear with me, please.
                      > >
                      >
                      > Hey Dave!
                      >
                      > Which two are in SVN? I know of only the one I linked to (and wrote/pieced
                      > together).
                      >
                      > Best,
                      >
                      > Henk
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.