1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[TOT] Text Editing Discussion

Discussion in 'Civ2 - Scenario Creation' started by Prof. Garfield, Sep 21, 2019.

  1. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,648
    Location:
    Ontario
    I thought it might be useful to have a place to discuss the actual writing of Lua programs. Not so much what is to be written, but how it is written. For example, what text editor do you use, and why? Do you name variables in a certain way to make using autocomplete easier? The sort of stuff that can make the work faster or easier once you figure it out, but isn't necessarily obvious.

    I'll start by providing a file with lua keywords related to the TOTPP. These can be used to add words to your syntax highlighter, so that TOTPP specific commands can be highlighted.
     

    Attached Files:

  2. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,648
    Location:
    Ontario
    I use VIM , (well, usually GVIM, the graphical interface version) as my main text editor. It takes some getting used to, so make sure you're comfortable with what you are writing before you start. Learning to program and learning VIM at the same time might make for a frustrating experience. If you want to give it a try, the vimtutor is pretty decent for at least the very basics.

    There are a few features I like about it:
    1. It means I don't need to use the mouse to move around, and especially, I don't need to use the mouse to highlight stuff (it can be done with the keyboard, which is much more precise).

    2. VIM Macros



    3. Visual Blocks (start at 1:04, since civfanatics is being difficult and won't let me just link to the video and have a time stamp)

     
    Last edited: Sep 21, 2019
  3. Patine

    Patine Deity

    Joined:
    Feb 14, 2011
    Messages:
    6,176
    @Prof. Garfield, I can't help but notice that those green creatures look like Pepe clones...
     
  4. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    2,648
    Location:
    Ontario
    I guess so. It has nothing to do with VIM, or, really, the video at all. This particular guy usually tries to to find some sort of image or meme trying to convey "this thing I'm about to show you is awesome, and if you don't use it, you suck" for his thumbnails. He even does it for software he's previously recommended if he's found something better. There's no politics in the video, if that's what you're concerned about.

    I did try for about twenty minutes to just put a link to the video (mostly because the first minute is talking about a different piece of software, and a link allows a timestamp), but Civfanatics insisted on changing it to media tags and embedding the video. If it actually bothers anyone, I suppose I could find a similar video without any sort of meme in the thumbnail. This guy just happened to be the guy that showed me enough about VIM to get me to make the switch, and I found the video reasonably concise, so why try to find something else?
     

Share This Page