Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    cliff_edge
    @cliff_edge:matrix.org
    [m]
    Looks like a am Vim user forever, every time i try something cool and new i miss something and return to Vim ))) Thanks for answering anyway.
    PowerMan2206
    @PowerMan2206
    And this happens when I try to do a split in term, so I guess it's not possible yet :/
    cliff_edge
    @cliff_edge:matrix.org
    [m]
    I see... Can i propose this as a feature for new releases? I think it is very convenient thing and quite universal. I usually use it to create bash, python or nodejs script interactively trying commands in split with opened terminal.
    PowerMan2206
    @PowerMan2206
    Yeah, the GitHub issues exist for a reason :P
    cliff_edge
    @cliff_edge:matrix.org
    [m]
    Will do, thanks )
    Jerry Zamostny
    @zamostny
    New to Micro... is it possible to set the font to something else?
    sean_
    @sean_:matrix.org
    [m]
    Hello all.
    I would like to build micro from source on windows, but I need to build for 32bit. When I build, it's using my native arch and I need to use 32bit
    Zachary Yedidia
    @zyedidia
    you can run GOOS=windows GOARCH=386 make build
    sean_
    @sean_:matrix.org
    [m]
    GOOS=windows : The term 'GOOS=windows' is not recognized as the name of a cmdlet
    Guess I need to see if golang is setup correctlyy
    Zachary Yedidia
    @zyedidia
    oh right, you are on windows -- you should probably run set GOOS=windows and set GOARCH=386 or something like that. They are environment variables that control the target OS and architecture for Go builds.
    sean_
    @sean_:matrix.org
    [m]
    thank you
    Jerry Zamostny
    @zamostny
    @zyedidia Is it possible to set a custom font in the config file?
    Zachary Yedidia
    @zyedidia
    no the font is controlled by your terminal, so you will have to change it in your terminal's settings if you want a different font
    Jerry Zamostny
    @zamostny
    Thank you!
    Aditya Khanna
    @AdityaKhanna
    discovered micro today.. looks amazing :-)
    Jerry Zamostny
    @zamostny
    Has anyone used micro as a todo list ?
    1 reply
    cliff_edge
    @cliff_edge:matrix.org
    [m]

    I use todo list like list of lists.

    I have following headers in my todo txt files:

    INBOX
    WAITING FOR SOMEONE
    INCOMING
    TODO
    IN PROGRESS
    DONE

    And i can use any advanced text editor to move rows between sections. Micro is ok with this setup

    Kyenos
    @kyenos
    So I've been hunting for how to change the file type of a file without renaming it. Does anyone know what the key combination for setting it on an open buffer is? or is this only available by interrogating the file name?
    Zachary Yedidia
    @zyedidia
    There is the filetype option which you can directly set
    John Galt
    @victor.yanchuk:matrix.org
    [m]

    Hi,

    I've just installed micro. Look very pretty.

    But system clipboard does not work for me.
    It says that It need to install xclip, but it is installed alone with micro. I've checked and it is present in the path '/usr/bin/xclip'.
    Micro show a message that I need to install xclip for external clipboard.

    System: Ubuntu 20.04
    My micro version is 2.0.1-1, but micro show

    username@locahost:~$ micro -version
    Version: 0.0.0-unknown

    Is it known issue with clipboard?

    victor.yanchuk
    @victor.yanchuk:matrix.org
    [m]
    I've reloaded a laptop and now all work. Thank you for editor.
    Edditoria
    @Edditoria
    Hi all, just come here to say hi. Micro is my favourite editor for SSH works now. Yay~
    cornerlord
    @cornerlord:matrix.org
    [m]
    What's up with wordwrap not being a able to be set on the console?
    Doesnt seem to work after adding it to settings.json either. I have softwrap on
    cornerlord
    @cornerlord:matrix.org
    [m]
    Hmm seems like the dnf has v2.0.8, will update and see if it fixes the issues
    edit: yup that fixed it
    zealsham
    @zealsham
    Hello micro folks , I was looking at improving the documentation of micro myself and if I’m permitted to try
    Zachary Yedidia
    @zyedidia
    What parts are you interested in improving
    ice-be
    @ice-be
    in the customisation,please add font style
    is there anyone know how to move file to $PATH directory,when i trying to "run sh-command" the edir say error because the file doesn't exist in $PATH,please help me
    i mean *editor
    Zachary Yedidia
    @zyedidia
    You can move the binary to /usr/local/bin which is on $PATH on most systems. You can also add a directory to $PATH by running export PATH=dir:$PATH (put this in your .bashrc or shell startup script). This only applies to non-windows systems.
    ice-be
    @ice-be
    perfect,i run micro on termux lol
    Mario Rocha
    @mariorocha2308
    how i can update micro version in terminal??
    and i need environment variables
    JackDinn
    @JackDinn
    I cant figure how to turn ON/OFF aspell via a key binding? The setting to turn it on/off in the settings.json is "aspell.check": "on" (or off, auto) but how do i do this as a toggle key binding?
    JackDinn
    @JackDinn
    i can do it by changing it like this at the Micro command:- setlocal "aspell.check" "on" OR setlocal "aspell.check" "off" but i just cant execute it as a key binding.
    Zachary Yedidia
    @zyedidia

    You'll have to use a lua script to achieve this. In ~/.config/micro/init.lua, you can make a function:

    function toggleAspell(bp)
        bp.Buf:SetOptionNative("aspell.check", not bp.Buf.Settings["aspell.check"])
    end

    and then in ~/.config/micro/bindings.json, you can bind this function:

    {
        "Alt-l": "lua:initlua.toggleAspell"
    }
    JackDinn
    @JackDinn
    @zyedidia Ok that sounds like something i can spend a few hours looking into. Hopefully i can figure it out (should be able to). Cheers :)
    JackDinn
    @JackDinn
    @zyedidia unfortunately it will turn off but will not turn back on again, cant see why or even how that is possible as if it works to turn it off with >
    not bp.Buf.Settings["aspell.check"] is the test to toggle it, it must work? scratches head
    Zachary Yedidia
    @zyedidia

    oh I looked at the aspell plugin source and it looks like they are using strings for the option which is confusing (so that they can have an "auto" option). So the option shouldn't be set to a boolean, but rather either the string "on" or "off". Try this -- hopefully it works:

    function toggleAspell(bp)
        if bp.Buf.Settings["aspell.check"] == "on" then
            bp.Buf:SetOptionNative("aspell.check", "off")
        elseif bp.Buf.Settings["aspell.check"] == "off" then
            bp.Buf:SetOptionNative("aspell.check", "on")
        end
    end

    You can add behavior if the option is "auto" too if you want.

    JackDinn
    @JackDinn
    Thought it might be the "auto" option, great stuff :)
    yep thats got it. Many thx @zyedidia
    Dmitry Maluka
    @dmaluka
    By the way, here is my lua script: https://github.com/zyedidia/micro/issues/2086#issuecomment-826351299 which adds generic "toggle" and "togglelocal" commands for toggling on/off arbitrary boolean options.
    Perhaps I should release it as a plugin. Or maybe it's better to implement these commands in micro itself (either in Go or just by adding my script as a built-in plugin), to make them available out of the box. @zyedidia what do you think? It's a useful functionality, I see quite a few people ask for it.
    Zachary Yedidia
    @zyedidia
    yeah I think that would be a useful builtin command
    JackDinn
    @JackDinn
    Well this was working just great when we last spoke about it but today when i first want to actually use it (turn off spell checking) its all failing. I have no clue why. setlocal "aspell.check" "on" & setlocal "aspell.check" "off" dont work any more neither does the lua toggle script function. I dont think i did anything to break it. What is the syntax to get a terminal out so i can at least see whats happing inside the function?
    JackDinn
    @JackDinn
    O my mistake, i remembered i had to actually write something before it would "activate/deactivate" not just move the cursor around. Sorry ^^
    Theo
    @C34A

    Hey, does anyone know for sure if net/http is working in lua? I'm not sure if I'm doing something wrong, but this code:

    local http = import("net/http")
    
    function init()
        micro.Log(http)
        micro.Log(http.Get)
        micro.Log(http.Get("http://127.0.0.1:9000/testfile.txt"))
    end

    gives me a runtime error: invalid memory address or nil pointer dereference on any of the lines in init...

    Theo
    @C34A
    nevermind, seems to just be broken in 2.0.6 from apt, building from source it works