Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

LoganDark

Members
  • Content Count

    19
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by LoganDark

  1. Just now, EderV said:

    Thankyou so much. Now it's working.

    Do you continue improving this "pluging" or you abandoned it?

     

    PD: Nice job with this :)

    Unfortunately I haven't worked on it in almost 2 years. I have a future editor planned but I also have a busy schedule.

    I understand this is a really nice thing to have and I'd love to continue it, I just don't have the time or motivation at the moment.

    Feel free to use it in its current state though, or modify/improve it!

  2. Just now, EderV said:

    I already install OS from Floppy Disc

     

    I writed  "/tmp# pastebin get ZnwyunqL /bin/shedit.lua" and It has downloaded yet but now I don't know hot to create a script that includes that editor

     

    How can I create that?

    After running that command you should be able to just run `shedit <file>` and be brought to the editor, just like `edit`.

  3. 2 hours ago, EderV said:

    I can't instal this editor. I put the line "pastebin get ZnwyunqL /bin/shedit.lua" but nothing happen the code shows this: 

    Usages:

    pastebin put [-f] <file>

    pastebin get [-f]  <id> <file>

    pastebin get [-f]  <id> [<arguments>]

     

    And nothing more happen.

     

    Could you please help?

    thanks

    That's certainly not right. It says right in the usage "pastebin get <id> <file>". Are you sure your install isn't messed up?

  4. I'm working on a new text editor (from scratch) that will do syntax highlighting on Lua code. I have a proper lexer all ready to go and I'm ready to start on the actual application, but I don't want to skimp on one of the best features: syntax highlighting!

    I'm looking for a quick and efficient way of drawing syntax highlighting, aka multicolored text. I'm not sure if there's anything more efficient than gpu.setForeground then gpu.set repeatedly, but if there is, I'd like to know! And if there isn't, I'd also like to know.

  5. 3 hours ago, ManIkWeet said:

    This is pretty amazing!

    Surely all the colors mean the GPU has a tough life, but this is 200% better than the default editor :)

    I actually like it showing tabs as special characters, allows me to manually get rid of them :D

    The GPU does have a tough life. Very tough life. 3/10 IGN.

    :o you would get rid of tabs? How rude! Tabs are people too, you know! /s

  6. It's "Lua", not "LUA".

    To read an entire file, use something like this:

    image.thumb.png.13993b396d6aa6576f13a9237e04c35c.png

    To split it into lines (I could probably do this better with patterns, but it works):

    image.png.6476bf0218364e9b234251feaf2a6c38.png

    And, looking at PIL, there's a function called table.remove.

    "The table.remove function removes (and returns) an element from a given position in an array, moving down other elements to close space and decrementing the size of the array."

    So just call table.remove(lines, 1).

    That should get you every line from 2 onwards. You should know how to do the rest.

    Molinko's solution is simpler, probably faster, and probably also more efficient though.

  7. 4 hours ago, BrisingrAerowing said:

    I may add something like this to my map making library (which I have kind of neglected). I'm probably going to completely rewrite that library to be more modular first, though.

    Feel free, just make sure to give me credit if you base it off of my code! :P

  8. To install: pastebin get 3up32qD5 /bin/tellraw.lua

    This is my tellraw program, which can be used in combination with the debug card to make image.png.55bf35cb1fa02510cb0494e88bf4a0ac.png

    06c4202195.png

    Result: 11aa83e4c9.png

    You may ask, how does the program work? It's pretty simple and easy, really. Whatever you type will be inserted into the text input. Even keys like tab and enter insert their respective characters (represented in the text box as small symbols like image.png.84d22100e4bd1346bde2162f670482fb.png). You can change the color by clicking on one of the 16 colors. The arrow points to the currently selected color.

    The quit button does just that, and the run button broadcasts the message to all players. The grey text underneath the text input is an indication of the colors of the text above it, and you can replace the color of characters you've already typed by clicking the grey text to color the character above wherever you click. The red X in the top right corner (not shown in the old screenshot above) completely clears the text input.

    Oh, and then there's the save and load. That's self explanatory. No explanation should be needed...

    If anyone needs further clarification, just ask. If anything doesn't work, reply and I'll try to help.

     

  9. On 12/7/2017 at 9:10 AM, Slamakans said:

    7j0Qqtx.png 

    u've got some tabs there :o

    I prefer working with tabs. Tab character support is on my to-do list. It'll (probably....) be implemented soon. For now, I just use Atom, an unlisted pastebin, and

    pastebin run

    to develop ShEdit :P 

  10. 33 minutes ago, Slamakans said:

    I wasn't really trying to mimic it, it happened to be the scheme I was using so I just nabbed most (all?) of the colors from it.
    I'm rewriting it all now though, so I'm going to add it in.

    If you're going to be rewriting it, my honest feedback would be I prefer the original Monokai colors, your editor looks like the colors are close enough but not quite :P 

  11. I decided to make an editor with syntax highlighting, just for the fun of it.

    The name stands for "syntax highlighting editor", it's very unoriginal, but I'm bad at names :P

    To use it, run this command on OpenOS: pastebin get ZnwyunqL /bin/shedit.lua

    The color scheme was (sorta, I redid it later) copied from this paste.

    Features:

    • Syntax highlighting!
    • Indent on enter
    • Line numbers
    • Jump to line
    • Hex colors are highlighted with the color they refer to (example: image.png.22be056833d7a7c6610d723fbd5a2be6.png)

    And probably more in the future if I need them..

    Screenshot:

    f7041247ca.png

    Any recommendations or comments are appreciated!

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.