Anybody use micro text editor? (imgur.com)
from HotsauceHurricane@lemmy.one to linux@lemmy.ml on 04 Sep 2024 17:26
https://lemmy.one/post/18728803

i started using micro and its pretty great. but when i try to open the terminal within the editor 

ctl+e

it seems to just open a whole new terminal window with no context within my document.

anybody got ideas?

#linux

threaded - newest

thingsiplay@beehaw.org on 04 Sep 2024 18:32 next collapse

What is the command executing when you press this shortcut? Usually you need to use an option with the terminal to execute a command. Most terminals use the option -e COMMAND , but it can be different for a few terminal apps. In example my terminal is “Konsole” and to open a new terminal with “Vim”, I need to use this command: konsole -e nvim . Or when I want to use arguments for vim itself, I can do it like this konsole -e “vim -R $HOME/Downloads/test.txt” as an example.

So find out how to do this with your terminal and use that as a command for your ctrl-e shortcut.

HotsauceHurricane@lemmy.one on 04 Sep 2024 20:32 collapse

when i edit a file i will put

micro test.txt 

sudo can be applied after. i should be able to open a terminal within the editor and have it appear on the bottom. I should be able to use it to change the settings or style of the micro editor, but it just opens up a whole new instance of my terminal. (which is fish btw)
i’ll look and see if i have any arguments to add.or maybe edit the config?

thingsiplay@beehaw.org on 04 Sep 2024 20:52 collapse

I’m a bit confused. Your terminal is not Fish. Fish is a shell like Bash, which interprets the commands. Terminal is the window application. Based on the linked image, I assume you have Kitty as your terminal? And you want to open a terminal within your editor using shortcut Ctrl-e?

If so, then I don’t know about this. I thought you want to run a terminal with micro as the editor from outside of micro, not after you started micro. I might have completely missed your point here then.

Confetti_Camouflage@pawb.social on 04 Sep 2024 22:07 next collapse

They want to get to the equivalent of vim’s :

HotsauceHurricane@lemmy.one on 05 Sep 2024 04:48 collapse

sorry, fish is shell, terminal is kitty. you are correct.

JubilantJaguar@lemmy.world on 04 Sep 2024 20:58 next collapse

Alas no but from your screenshot I learned all about grim. Thanks!

HotsauceHurricane@lemmy.one on 05 Sep 2024 04:49 next collapse

learning new stuff every day!

Ghoelian@lemmy.dbzer0.com on 05 Sep 2024 11:55 collapse

It’s pretty nice, especially in combination with slurp which lets you select a part of the screen.

I have this mapped to my printscreen shortcut: grim -g “$(slurp)” - | wl-copy, which lets you select a part of the screen to screenshot, and copies the image to the clipboard.

JubilantJaguar@lemmy.world on 05 Sep 2024 12:27 collapse

Ha! Just checked and it turns out this is the exact line that’s already in my screenshot script. Which apparently I pilfered without trying very hard to understand - as usual! Can confirm it works great.

Confetti_Camouflage@pawb.social on 04 Sep 2024 22:03 next collapse

Unbind ctrl+e from your window manager / terminal emulator. The shortcut is never reaching Micro at all.

HotsauceHurricane@lemmy.one on 05 Sep 2024 04:49 next collapse

i’ll try that

HotsauceHurricane@lemmy.one on 05 Sep 2024 07:00 collapse

that was exactly it! thank you!

spacemanspiffy@lemmy.world on 05 Sep 2024 12:29 collapse

I feel like there is an alternate reality where I use micro. I remember getting excited when it was first announced, then I just never really needed it.