[Solved]I might have mis-configured something now my PKGBUILD use this vim like editor? I don't even have vim installed, it only print out plain text in the terminal before, how can I revert it back?
from ColdWater@lemmy.ca to linux@lemmy.ml on 25 Apr 08:17
https://lemmy.ca/post/42865996

#linux

threaded - newest

Fecundpossum@lemmy.world on 25 Apr 08:37 next collapse

I could be mistaken, but that editor looks like nano, which is just a super simple text editor. Ctrl-x should bring quit the editor and ask if you want to save.

How were you editing PKGBUILD files before? A GUI based editor?

ColdWater@lemmy.ca on 25 Apr 08:51 next collapse

It could be nano but I had to press Q to exit which is not nano key binding (Ctrl + X), I never edit PKGBUILD in terminal before, I’ll edit it in Kate if I had to

LouSlash@sh.itjust.works on 25 Apr 09:00 collapse

Idk how to revert it, but for me it looks like less

ColdWater@lemmy.ca on 25 Apr 09:09 collapse

Dude you’re a time saver, it’s actually less a text editor I never heard of before after I removed it PKGBUILD revert back to what it was before, it probably come with man page package I installed recently

Fecundpossum@lemmy.world on 25 Apr 09:14 next collapse

Another way to fix this, would have been to navigate to the pkgbuild file in question, right click, open with, Kate. I’m more familiar with Gnome than KDE but I assume there’s an option to make Kate your default for opening files of that type.

LouSlash@sh.itjust.works on 25 Apr 09:21 collapse

After my first comment i digged into the man page of paru and found that another, although temporary, way is to use -fm <command> flag

hallettj@leminal.space on 25 Apr 15:41 collapse

Less is not an editor, it’s a “pager” which is a read-only viewer for files, or for command output that doesn’t fit in a single screen, or whatever. Generally to control which you want programs use you set the PAGER environment variable.

The old grandaddy pager was called “more”, as in “there’s more text than fits on the screen”. The successor is called “less”. For most purposes, less is more.

PotatoesFall@discuss.tchncs.de on 25 Apr 09:09 collapse

nano doesn’t look like that afaik. It could be vi ? maybe emacs?

taaz@biglemmowski.win on 25 Apr 09:09 next collapse

How did you open this? Maybe something overrode your default text editor application (look in settings for Default Applications).
Also maybe check your EDITOR env variable (echo $EDITOR), though that is only used when a different CLI program wants to open an editor for you (in CLI)

ColdWater@lemmy.ca on 25 Apr 09:13 collapse

Another commenter said less and it’s actually less doing this, it come with man package and set itself as default editor for PKGBUILD

a14o@feddit.org on 25 Apr 09:09 collapse

Looks like less to me. How did you open the file? Double click from file explorer? Then you need to check your default applications.

ColdWater@lemmy.ca on 25 Apr 09:15 collapse

It’s less after I removed it, it revert itself back to normal

MonkderVierte@lemmy.ml on 25 Apr 09:32 next collapse

Put EDITOR=youreditor in your env and keep less. Less is fine and it’s usually default for man pages too.

a14o@feddit.org on 25 Apr 09:53 collapse

As others have said, less is super useful, you should keep it installed. There are better ways to open text files with your preferred editor than removing all alternatives.