News for hackers. Stuff that matters.
Re:Modeless Vim by bloopernova on Tuesday January 16, 2024 @03:48AM (#39010982)
macOS uses a lot of Emacs bindings. Ctrl-a for beginning of line, ctrl-e for end, etc etc.

And, agreed, macOS' use of shortcuts is fantastic and I wish I could replicate it on Linux.

Re:Modeless Vim by anthk on Tuesday January 16, 2024 @04:41AM (#39011376)
If you use gnome/xfce:

    gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

    xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs
Try both commands.
Re:Modeless Vim by bloopernova on Tuesday January 16, 2024 @11:03AM (#39014864)
Very cool!

I also want to use Command (Super or Hyper?), which really improves keyboard shortcuts. Command + left/right = jump to beginning or end of line, Option + left/right = jump to beginning/end of word. I know you can do the same with Control + Shift, but some apps don't support it. Plus Cmd+c/x/v for copy/cut/paste works fine in terminals, I don't have to remember to "code switch" my shortcut "language". Cmd+Backspace deletes the whole line, etc etc.

Re:Modeless Vim by anthk on Tuesday January 16, 2024 @11:55AM (#39015522)
I just swap Ctrl and Caps Lock, much better.

setkbmap us -option ctrlL:swapcaps -option compose:rwin

You can place that command at XFCE's startup settings for applications.

Re:Modeless Vim by aidenn0 on Tuesday January 16, 2024 @11:17PM (#39023231)
You missed the point; Ctrl-C is never going to be "copy" in a terminal, since that shortcut is already in use. Cmd-C can work everywhere, but GUI applications on linux do not default to that.
Re:Modeless Vim by csdvrx on Wednesday January 17, 2024 @03:40PM (#39033138)
> You missed the point; Ctrl-C is never going to be "copy" in a terminal, since that shortcut is already in use

My `stty intr ^X` disagrees

I've made Ctrl-C do copy paste in the terminal, even in vim, with a special function for wayland:

vnoremap <C-C> <CMD>call WLCopy()<CR>

Re:Modeless Vim by aidenn0 on Tuesday January 16, 2024 @11:16PM (#39023222)
I bound WindowsKey-C to run the command "xsel|xsel -b" which copies the active selection to the clipboard. It's a small step in the right direction; it's possible to get paste working as well, but that takes awareness of apps (or reconfiguring all GUI applications to use the same shortcut as the terminal).
Re:Modeless Vim by artsi0m on Tuesday January 16, 2024 @01:52PM (#39017159)
I use emacs and I respect emacs developers, but it is not originally emacs bindings: http://unix-kb.cat-v.org/