Remap Caps-Lock key to Ctrl.
setxkbmap -option ctrl:nocaps
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
- Create new entry with type Binary value named: Scancode Map
- Fill these into it
| 00,00,00,00, | 00,00,00,00, |
| 02,00,00,00, | 1d,00,3a,00, |
| 00,00,00,00 |
- Restart computer
In Emacs 29+, set the user-emacs-directory with the flag –init-directory.
When working under Windows OS, Maple Mono NF CN will be used as the default font if avalible, which can be get from here. Segoe UI Symbol is for all unicode characters and it is installed as default.
When working under Linux system, JetBrains Mono will be the default font.
| Name | Keybinding | Description |
|---|---|---|
| er/expand-region | C-= | Increase selected region by semantic units |
| org-ctrl-c-ctrl-c | C-c C-c | Set tags in headline, or update according to changed information at point. |
| org-insert-link | C-c C-l | Insert a link |
| org-insert-structure-template | C-c C-, | Insert a block structure of the type #+begin_foo/#+end_foo. |
| org-metadown | M-<down> | Move subtree down or move table row down. |
| org-metaleft | M-<left> | Promote heading, list item at point or move table column left. |
| org-metaright | M-<right> | Demote heading, list item at point or move table column right. |
| org-metaup | M-<up> | Move subtree up or move table row up. |
| org-toggle-inline-images | C-c C-x C-v | Toggle the display of inline images. |
| pop-global-mark | C-x C-@ | Pop off global mark ring and jump to the top location. |
| recenter-top-bottom | C-l | Scroll the window so that current line is in the middle of the window. |
- Create directory readtheorg in org repo
- Download these files from org-html-themes
src/lib/js/bootstrap.min.js src/lib/js/jquery.min.js src/lib/js/jquery.stickytableheaders.min.js src/readtheorg_theme/css/htmlize.css src/readtheorg_theme/css/readtheorg.css src/readtheorg_theme/js/readtheorg.js - Add these to the org file that want to export
#+OPTIONS: num:nil \n:t #+OPTIONS: html-style:nil #+HTML_HEAD: <link rel="stylesheet" type="text/css" href=".\readtheorg\htmlize.css"/> #+HTML_HEAD: <link rel="stylesheet" type="text/css" href=".\readtheorg\readtheorg.css"/> #+HTML_HEAD: <script type="text/javascript" src=".\readtheorg\jquery.min.js"></script> #+HTML_HEAD: <script type="text/javascript" src=".\readtheorg\bootstrap.min.js"></script> #+HTML_HEAD: <script type="text/javascript" src=".\readtheorg\jquery.stickytableheaders.min.js"></script> #+HTML_HEAD: <script type="text/javascript" src=".\readtheorg\readtheorg.js"></script>
This package requires the fonts included with all-the-icons to be installed. Run M-x all-the-icons-install-fonts to do so.
Copy emacs/emacs.service to /usr/lib/systemd/system/emacs.service
Write these config into ~/.tmux.conf to
set -g display-panes-time 5000 bind -n M-Left select-pan -L bind -n M-Right select-pan -R bind -n M-Up select-pan -U bind -n M-Down select-pan -D
TPM (Tmux Plugin Manager)是tmux的插件管理工具 https://github.com/tmux-plugins/tpm
This is a regular layout configuration, I call it work_work
PWD=`pwd`
SESSION_NAME=`basename $PWD | sed 's/\./\_/g'`
tmux has-session -t=$SESSION_NAME 2>/dev/null
if [ $? != 0 ]; then
tmux -2 new-session -s $SESSION_NAME \; \
send-keys '<command>' C-m \; \
split-window -v -p 90\; \
send-keys '$ZSH_VERSION && zsh' C-m \; \
send-keys '<command>' C-m \; \
split-window -v \; \
split-window -h \; \
send-keys '<command>' C-m \; \
split-window -v\; \
select-pane -t 1
else
tmux -2 a -t $SESSION_NAME
fiyum install libevent ncurses libevent-devel ncurses-devel gcc make bison pkg-config automake -y
git clone https://github.com/tmux/tmux.git
cd tmux && sh autogen.sh
./configure && make && make install# REF: https://www.nordtheme.com/docs/ports/tmux/installation
yum install tmux -y
mkdir -p ~/.tmux/themes/
git clone https://github.com/arcticicestudio/nord-tmux.git ~/.tmux/themes/nord.tmux
echo "run-shell \"~/.tmux/themes/nord-tmux/nord.tmux\"" > ~/.tmux.conf
tmux source-file ~/.tmux.confhttps://zhuanlan.zhihu.com/p/58668651
curl -fsSL “https://raw.githubusercontent.com/peterzililuo/tmuxconfig/master/install.sh” | /bin/sh
https://github.com/cyrus-and/gdb-dashboard
https://github.com/cyrus-and/gdb-dashboard/wiki/Support-older-GDB-versions
GDB dashboard requires at least GDB 7.7 compiled with Python 2.7 in order to work properly.
If it is really impossible to use an up-to-date version, the following script will patch the dashboard and add the missing pieces (some features may suffer from this):
mkdir -p ~/.gdbinit.d/
wget 'https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/python/lib/gdb/FrameDecorator.py;hb=4bd8fc3a1362970d9800a263987af8093798338b' -O ~/.gdbinit.d/FrameDecorator.py
sed -i '1s/^/python gdb.COMPLETE_EXPRESSION = gdb.COMPLETE_SYMBOL\n/' .gdbinit
sed -i "s/gdb_breakpoint.temporary/None/g" .gdbinit
cat >>~/.gdbinit <<EOF
python
import imp
gdb.FrameDecorator = imp.new_module('FrameDecorator')
gdb.FrameDecorator.FrameDecorator = FrameDecorator
end
EOFSave this script as .git/hooks/pre-commit
#!/bin/bash
# Get `Git commit` file list
git diff --cached --name-only --diff-filter=ACM | while read file; do
if [ -f "$file" ]; then
file_type=$(file -b "$file")
if echo "$file_type" | grep -q "text"; then
has_trailing_whitespace=$(grep -n -E '[[:space:]]+$' "$file")
# Exit and print line if there's trailing whitespace
if [ -n "$has_trailing_whitespace" ]; then
echo "Warning: $file has lines with trailing whitespace."
echo $has_trailing_whitespace
exit 1
fi
else
continue
fi
fi
donePs. Although there are some defects, it can be used for the time being without any major issues. I tried to add it to the project using the ‘-f’ option in ‘git add’ but it didn’t succeed. However, manually adding it to the project seems to be fine as well. And it has only been tested in Git Bash on Windows.