Editor and Terminal Quick Notes
A handful of editor and terminal snippets.
Sort lines in Neovim
Sort the whole buffer case-insensitively:
:%sort i
Update Emacs packages
Refresh the package list and open the package menu:
package-refresh-contents
package-list-packages
Then mark upgrades with U and execute with x, or run:
package-menu-mark-upgrades
package-menu-execute
GNOME Terminal with tmux
This keeps tmux mouse selection useful while copying into the system clipboard
with xclip.
set -g mouse on
set -g set-clipboard off
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
Check for any existing copy-mode-vi y binding before adding this.
Xournal++ export format
This is the Xournal++ export format I like. Just date and time, much less hassle.
%Y%m%d%H%M
Godot external editor with Neovim
Start Neovim with a server pipe inside the project:
nvim --listen "$PWD/nvim.pipe"
Set the external editor executable to:
/usr/bin/nvim
Set the arguments to:
--server {project}/nvim.pipe --remote-send ":e {file}:call cursor({line}+1,{col})"
- ← Previous
Linux Admin Quick Notes - Next →
tar.gz Cheatsheet