- figlet (termux-banner only)
- FiraCode NerdFont (disk-space progress bar ligatures)
- Unexpected Keyboard
apt update && apt install git
rm -rf .termux/termux.properties
## REPLACE THIS URL ⬇️
git clone --bare --recurse-submodules https://github.com/GR3YH4TT3R93/dotfiles.git ~/GitHub/dotfiles
## REPLACE THIS URL ⬆️
git --git-dir=$HOME/GitHub/dotfiles --work-tree=$HOME checkout
git --git-dir=$HOME/GitHub/dotfiles --work-tree=$HOME config --local status.showUntrackedFiles no
## THE NEXT LINE AUTOMATICALLY RUNS THE AUTO-INSTALLER REMOVE IF YOU WANT TO RUN IT MANUALLY
~/.termux/autoinstall.sh
git init
git remote add upstream https://github.com/GR3YH4TT3R93/dotfiles.git
git config --local status.showUntrackedFiles no
git fetch upstream
git reset --hard upstream/main
git submodule update --init
# Manual, you choose!
~/.termux/install.sh
# Auto, installs everything with minimal interaction
~/.termux/autoinstall.sh
# Bare:
b remote set-url origin https://your.git.fork/repo
b remote add upstream https://github.com/GR3YH4TT3R93/dotfiles.git
# Regular:
git remote add origin https://your.git.fork/repo
e # open editor
<keyboard name="GR3Y" script="latin">
<row>
<key key0="q" key2="superscript" key4="esc"/>
<key key0="w" key2="2" key3="\@" key4="~"/>
<key key0="e" key2="3" key4="\#"/>
<key key0="r" key2="4" key4="$"/>
<key key0="t" key2="5" key4="%"/>
<key key0="y" key2="6" key3="^"/>
<key key0="u" key2="7" key3="&"/>
<key key0="i" key2="8" key3="*"/>
<key key0="o" key2="9" key3="\?"/>
<key key0="p" key1="subscript" key2="0" key3="!"/>
</row>
<row>
<key shift="0.5" key0="a" key2="tab"/>
<key key0="s" key3="{" key4="}"/>
<key key0="d" key3="[" key4="]"/>
<key key0="f" key3="(" key4=")"/>
<key key0="g" key3="/" key4="\\" key7="|"/>
<key key0="h" key3="<" key4=">"/>
<key key0="j" key3="+" key4="="/>
<key key0="k" key3="_" key4="-"/>
<key key0="l" key1="`" key3=":" key4=";"/>
</row>
<row>
<key width="1.5" key0="shift" key2="loc capslock"/>
<key key0="z" key3="paste" key4="copy"/>
<key key0="x" key3="selectAll" key4="cut"/>
<key key0="c" key3="undo" key4="redo"/>
<key key0="v" key3="." key4=","/>
<key key0="b" key3=""" key4="'"/>
<key key0="n" key3="home" key4="end"/>
<key key0="m" key3="page_up" key4="page_down"/>
<key width="1.5" key0="backspace" key2="delete"/>
</row>
</keyboard>
- Install Deps
apt install luarocks cmake
luarocks install lpeg
- Clone repo
git clone https://github.com/neovim/neovim --depth 1 -b v0.10.0
- CD into Repo
neovim/ # or cd neovim
- Build and Install
cmake -S . -B build_dir -D CMAKE_INSTALL_PREFIX=$PREFIX
cmake --build build_dir -j8
cmake --install build_dir
- Clean up Install files
cd
rm -rf neovim
Use ESC
or CTRL-[
to enter Normal mode
.
But some people may like the custom escape key such as jj
, jk
and so on,
if you want to custom the escape key, you can learn more from here.
ctrl-p
: Previous command in historyctrl-n
: Next command in history/
: Search backward in historyn
: Repeat the last/
Normal mode
is indicated with block style cursor, and Insert mode
with
beam style cursor by default.
In Normal mode
you can use vv
to edit current command line in an editor
(e.g. vi
/vim
/nvim
...), because it is bound to the Visual mode
.
You can change the editor by ZVM_VI_EDITOR
option, by default it is
$EDITOR
.
$
: To the end of the line^
: To the first non-blank character of the line0
: To the first character of the linew
: [count] words forwardW
: [count] WORDS forwarde
: Forward to the end of word [count] inclusiveE
: Forward to the end of WORD [count] inclusiveb
: [count] words backwardB
: [count] WORDS backwardt{char}
: Till before [count]'th occurrence of {char} to the rightT{char}
: Till before [count]'th occurrence of {char} to the leftf{char}
: To [count]'th occurrence of {char} to the rightF{char}
: To [count]'th occurrence of {char} to the left;
: Repeat latest f, t, F or T [count] times,
: Repeat latest f, t, F or T in opposite direction
i
: Insert text before the cursorI
: Insert text before the first character in the linea
: Append text after the cursorA
: Append text at the end of the lineo
: Insert new command line below the current oneO
: Insert new command line above the current one
There are 2 kinds of keybinding mode for surround operating, default is
classic
mode, you can choose the mode by setting ZVM_VI_SURROUND_BINDKEY
option.
classic
mode (verb->s->surround)
S"
: Add"
for visual selectionys"
: Add"
for visual selectioncs"'
: Change"
to'
ds"
: Delete"
s-prefix
mode (s->verb->surround)
sa"
: Add"
for visual selectionsd"
: Delete"
sr"'
: Change"
to'
Note that key sequences must be pressed in fairly quick succession to avoid a timeout. You may extend this timeout with the ZVM_KEYTIMEOUT
option.
vi"
: Select the text object inside the quotesva(
: Select the text object including the brackets
Then you can do any operation for the selection:
- Add surrounds for text object
vi"
->S[
orsa[
=>"object"
->"[object]"
va"
->S[
orsa[
=>"object"
->["object"]
- Delete/Yank/Change text object
di(
orvi(
->d
ca(
orva(
->c
yi(
orvi(
->y
In normal mode, typing ctrl-a
will increase to the next keyword, and typing
ctrl-x
will decrease to the next keyword. The keyword can be at the cursor,
or to the right of the cursor (on the same line). The keyword could be as
below:
- Number (Decimal, Hexadecimal, Binary...)
- Boolean (True or False, Yes or No, On or Off...)
- Weekday (Sunday, Monday, Tuesday, Wednesday...)
- Month (January, February, March, April, May...)
- Operator (&&, ||, ++, --, ==, !==, and, or...)
- ...
For example:
- Increment
9
=>10
aa99bb
=>aa100bb
aa100bc
=>aa101bc
0xDe
=>0xdf
0Xdf
=>0Xe0
0b101
=>0b110
0B11
=>0B101
true
=>false
yes
=>no
on
=>off
T
=>F
Fri
=>Sat
Oct
=>Nov
Monday
=>Tuesday
January
=>February
+
=>-
++
=>--
==
=>!=
!==
=>===
&&
=>||
and
=>or
- ...
- Decrement:
100
=>99
aa100bb
=>aa99bb
0
=>-1
0xdE0
=>0xDDF
0xffFf0
=>0xfffef
0xfffF0
=>0xFFFEF
0x0
=>0xffffffffffffffff
0Xf
=>0Xe
0b100
=>0b010
0B100
=>0B011
True
=>False
On
=>Off
Sun
=>Sat
Jan
=>Dec
Monday
=>Sunday
August
=>July
/
=>*
++
=>--
==
=>!=
!==
=>===
||
=>&&
or
=>and
- ...