183
submitted 7 months ago by Samueru@lemmy.ml to c/linux@lemmy.ml
top 21 comments
sorted by: hot top controversial new old
[-] 5714@lemmy.dbzer0.com 58 points 7 months ago
[-] atyaz@hexbear.net 10 points 7 months ago

Is that how we're ending our comments ZZ

[-] bleepbloopbop@hexbear.net 4 points 7 months ago* (last edited 7 months ago)

I never got used to doing wq over a simple :x

I get that you can write and quit separately, and I do it when needed, but 95% of the time, there's no need

[-] hangukdise@lemmy.ml 8 points 7 months ago

My muscle memory causes :wq to be typed without my conscient intervention

[-] bleepbloopbop@hexbear.net 4 points 7 months ago

what's really dangerous is if you do a bunch of force quits in a row with :q! and then you start to get muscle memory for that and accidentally lose a whole document you were working on

[-] taladar@sh.itjust.works 3 points 7 months ago

You mean you don't have muscle memory to obsessively save every time you stop typing?

[-] humbletightband@lemmy.dbzer0.com 2 points 7 months ago

If I lose it, I don't need it

[-] magikmw@lemm.ee 3 points 7 months ago

Software predeterminitism - If it were good code it would have saved itself.

[-] bleepbloopbop@hexbear.net 1 points 7 months ago

wellllllll

I don't think I've ever had to redo more than 15 mins of work due to this mistake, but it's a dangerous road lol

[-] autotldr@lemmings.world 27 points 7 months ago

This is the best summary I could come up with:


For fans of the Vim text editor, the latest development code has landed support for the XDG Base Directory "XDG_BASE_DIR" specification.

Rather than just dumping all configuration files / cache / data into the home directory folder, Vim can now respect the XDG Base Directory specification with regards to the directories such as for the XDG cache, configuration files, persistent data files, and state data files.

Vim will continue to work fine for environments not setting the XDG paths / environment variables.

The XDG_BASE_DIR support was merged this week after being under review and discussion since last month.

This closes a 7 year old bug report requesting Vim follow XDG_CONFIG_HOME specifications or the APPDATA path on Windows.


The original article contains 117 words, the summary contains 117 words. Saved 0%. I'm a bot and I'm open source!

[-] maiskanzler@feddit.de 14 points 7 months ago
[-] walthervonstolzing@lemmy.ml 37 points 7 months ago

The bot says it 'saved 0%'; so at least it's honest.

[-] Olap@lemmy.world 4 points 7 months ago

It'll be a cold day in hell before I give up my ~/.vimrc

[-] Rustmilian@lemmy.world 13 points 7 months ago

Now get the stupid ssh clients to do the same.

[-] thingsiplay@beehaw.org 9 points 7 months ago
[-] ouch@lemmy.world 6 points 7 months ago
[-] Wilmo@lemmy.world 6 points 7 months ago* (last edited 7 months ago)

Holy moly great news. There's hope for our /home after all. I think Firefox has an open bug thread or request thread for XDG Base Directory that's like ..20 years old?

[-] Samueru@lemmy.ml 2 points 7 months ago* (last edited 7 months ago)

https://bugzilla.mozilla.org/show_bug.cgi?id=259356

20 indeed

I use this script with librewolf, give it a try, simply place it in $HOME/.local/bin name it librewolf and export that location as first in $PATH:

#!/bin/sh

APPHOME="$XDG_DATA_HOME/librewolf/HOME"
APPEXEC="$HOME/.local/opt/librewolf/librewolf" # Replace this with the path to librewolf

# XDG Check
if [ -z "$XDG_CACHE_HOME" ] || [ -z "$XDG_CONFIG_HOME" ] || [ -z "$XDG_DATA_HOME" ] || [ -z "$XDG_STATE_HOME" ]; then
	echo "One or more XDG Base dir variables not defined, bailing out"; exit 1
fi

# MAKE FAKEHOME AND LINKS
mkdir -p "$APPHOME/.local" "$XDG_DATA_HOME/pki" "$XDG_DATA_HOME/icons" 2>/dev/null
[ ! -e "$APPHOME/.local/share" ] && ln -s "$XDG_DATA_HOME" "$APPHOME/.local/share"
[ ! -e "$APPHOME/.local/state" ] && ln -s "$XDG_STATE_HOME" "$APPHOME/.local/state"
[ ! -e "$APPHOME/.config" ] && ln -s "$XDG_CONFIG_HOME" "$APPHOME/.config"
[ ! -e "$APPHOME/.cache" ] && ln -s "$XDG_CACHE_HOME" "$APPHOME/.cache"
[ ! -e "$APPHOME/.icons" ] && ln -s "$XDG_DATA_HOME/icons" "$APPHOME/.icons" # Some apps have hardcoded ~/.icons path
[ ! -e "$APPHOME/.pki" ] && ln -s "$XDG_DATA_HOME/pki" "$APPHOME/.pki" # Chromium/electron hardcode ~/.pki

find "$APPHOME" -xtype l -delete
for FILES in "$HOME"/*; do
    FILENAME=$(basename "$FILES")
    DEST="$APPHOME/$FILENAME"
    if [ ! -e "$DEST" ]; then
        ln -s "$FILES" "$DEST"
    fi
done


# START APP AT APPHOME
HOME="$APPHOME" "$APPEXEC" "$@" || notify-send "App not found"
[-] shadowintheday2@lemmy.world 2 points 7 months ago
this post was submitted on 15 Apr 2024
183 points (97.9% liked)

Linux

48349 readers
676 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS