Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Zachary Yedidia
    @zyedidia
    Actually I just looked into the terminal emulator problem and it was just a problem with emitting colors since adopting tcell v2 and I have now fixed the issue.
    David Overcash
    @funnylookinhat

    @zyedidia Awesome - is there a test build I can try?

    Edit - I see you pushed the commit here - zyedidia/micro@49786cf - I can just build myself :)

    David Overcash
    @funnylookinhat
    Does anyone have an example of using the Tab key in bindings? I'm trying this binding but it's not working - "Ctrl-Tab": "NextSplit"
    Zachary Yedidia
    @zyedidia
    Unfortunately micro gets user input events from the terminal, which doesn't send all events. It looks to me like no event is sent for Ctrl-Tab. I tested be running > raw which prints the event micro receives for every input, and I saw nothing happen when pressing Ctrl-Tab.
    David Overcash
    @funnylookinhat
    Ah OK - well at least I'm not crazy then :)
    David Overcash
    @funnylookinhat
    Does multi-cursor not work on Linux? I highlighted a few lines and hit Alt-n and it doesn't do anything.
    Control + Left Click works - but usually I use keyboard shortcuts :)
    Zachary Yedidia
    @zyedidia
    Alt-n should work fine on linux, what terminal are you using?
    David Overcash
    @funnylookinhat
    GNOME Terminal 3.36.2
    What is the expected behavior? I would expect to highlight a few lines, hold alt and hit n, and a cursor should show up at the end of each highlighted line.
    Zachary Yedidia
    @zyedidia
    The expected behavior is that it will search in the document for the current selection or word and select any matches with a new cursor. Maybe closer to what you want is AltShiftUp and AltShiftDown which will spawn new cursors above and below the current one.
    David Overcash
    @funnylookinhat
    Aha !
    Yes that works - thank you!
    Tobias Jensen
    @tobias1012

    @tobias1012 Yes I think the source will have to be modified a bit to support autocompletion via plugins. I experimented with implementing LSP in the core which you can find on the lsp branch (run with -debug and inspect the log to look at what's going on -- it should support autocomplete, autoformatting and "hover" info via a keybinding), but I think it might be better to offload more of the work to a plugin and have minimal lsp support in the core. I'll have to revisit this at some point.

    I think I'll try to get some autocomplete functionality with plugins, I don't know how usable that would be, but then the lsp branch could be entierly offloaded

    authorfunction
    @authorfunction
    Hi! Is the autosave setting not working? I've used "autosave:" 2 in the settings.json file, but this seems to have no effect at all?
    Zachary Yedidia
    @zyedidia
    Yes I think you are right it currently only works if manually set during the session. I’ll fix this for the next version.
    authorfunction
    @authorfunction
    Aha, thanks – how do I go about to set it manually?
    ThatXliner
    @ThatXliner

    ...This works much better than slap editor!

    I can't even download that junk. Micro > Vim!

    BTW, what is ESC+ on iTerm2 anyway
    But then, Atom > Micro :neutral_face:
    Zachary Yedidia
    @zyedidia
    The ESC+ Option in iterm makes it send the escape character + key when you press option+key
    By default on Mac pressing option and another key will just insert a Unicode character
    So if you press option+x with ESC+, iterm will send the alt+x event to micro which is encoded as “\x1bx”, where \x1b is the escape byte
    ThatXliner
    @ThatXliner
    Oh ok. I love the macros in micro. It's simple, just enough, and yet powerful
    It's a shame I can't install the Atom packages that "add" macro functionality.
    I wonder if you can add some python APIs. I don't know Go or Lua and I'm not really good at color schemes, so a python API would be nice.
    Hamel Yesid Barrero Castaño
    @HamelBarrer
    hi
    ThatXliner
    @ThatXliner
    hi
    andy
    @drewauff
    iTerm2 user here, How can I get micro to show an open files filename in the terminals tab title?
    Wang Chao
    @zjsxwc
    im linux xfce terminal useing xterm color theme
    Carlos Augusto Zayas Guggiari
    @czayas_gitlab
    Hi! I program mostly in Python and I'm used to automatic indentation in other editors when hitting enter after typing a statement ending in a colon. Is there a way to get this in Micro Editor?
    ThatXliner
    @ThatXliner
    @czayas_gitlab Yeah! And soft tabs wouldn't hurt, too
    Zachary Yedidia
    @zyedidia
    Currently micro doesn't do any smart autoindentation based on filetype. What do you mean by soft tabs?
    Carlos Augusto Zayas Guggiari
    @czayas_gitlab
    @ThatXliner soft tabs are already supported in Micro Editor.
    ThatXliner
    @ThatXliner
    I meant soft wrap
    Dmitry Maluka
    @dmaluka
    @czayas_gitlab There is no built-in language based autoindentation but it can be scripted in Lua. You can add something like this to init.lua:
    local util = import("micro/util")
    
    function preInsertNewline(bp)
        if bp.Buf:FileType() == "python" then
            local curLine = bp.Buf:Line(bp.Cursor.Y)
            if bp.Cursor.X == util.CharacterCountInString(curLine) and bp.Cursor.X > 0 and
                    util.RuneAt(curLine, bp.Cursor.X-1) == ":" then
                bp:InsertNewline()
                bp:InsertTab()
                return false
            end
        end
        return true
    end
    Carlos Augusto Zayas Guggiari
    @czayas_gitlab
    @dmaluka It works! Thanks!
    Ron Gilbert
    @grumpygamer
    Micro seems to save a log.txt in whatever directory I am in. Is this normal? Is there a way to turn it off?
    Zachary Yedidia
    @zyedidia
    Yeah that's not supposed to happen and is a result of the version in the Ubuntu repos accidentally having debug mode enabled. Just download the (much more recent) binary or deb file from the releases page instead. https://github.com/zyedidia/micro/releases
    You can also install using the getmicro script: curl https://getmic.ro | bash
    Ron Gilbert
    @grumpygamer
    Great! Thanks!
    ThatXliner
    @ThatXliner
    BTW, I want to improve the https://getmic.ro script
    because
    There should be an option where it automatically moves it to $HOME/bin if $HOME/bin exists (if not, mkdir it) and it has execute, write, read acess
    :D
    Zachary Yedidia
    @zyedidia
    I think you can just run cd ~/bin; curl https://getmic.ro | bash; cd - to get the same behavior using the current script.
    ThatXliner
    @ThatXliner
    yeah
    (cd $HOME/bin is better :p)
    Dylan Richardson
    @dylrich
    Has anyone written a regex for highlighting function names in Micro? I could really use some help modifying the Go syntax file so I can get function names (builtins and user-defined) highlighted
    In addition -- is it not possible to maintain default foreground/background color for a selection block? I want it to basically work like: If I leave either foreground or background empty for the selection color-link, it should default to whatever other color it'd highlight normally. Right now for me no matter where I place the color-link in terms of order it will default me to e.g. a white foreground, which is hard to read. I would really appreciate some help on these two questions!